Fixed relative uri being parsed as absolute

Fixed an issue where a protocol in the query part of the uri would make
the uri seem absolute while it is relative.