Append a protocol if its missing.

Fixes #2242 
this seems like a good place to combine if's