will this work correctly if it is a protocol relative url?  http://tools.ietf.org/html/rfc3986#section-4.2