Fix encoding of the query part of an URL.
commitaa8918e962f9076972feadf0a57fc5385093b7cf
authorbrettw@gmail.com <brettw@gmail.com@8873c55e-713a-0410-88f8-23d9c3d90b1b>
Mon, 19 Oct 2009 17:20:48 +0000 (19 17:20 +0000)
committerbrettw@gmail.com <brettw@gmail.com@8873c55e-713a-0410-88f8-23d9c3d90b1b>
Mon, 19 Oct 2009 17:20:48 +0000 (19 17:20 +0000)
treee0d93bc8d47d8e023bf6cfbcb0d0c7827772f558
parent459bf8f08ff7f651b8bced6cc8da9276e3851d1e
Fix encoding of the query part of an URL.

Encoding of the query part of an URL was inconsistent:
If it was part of a larger relative URL, it would get encoded.
However, if the query part was stand-alone, then it would not be encoded.

As indicated by the original layout test referenced in the bug (see below),
this patch changes the code so that the query part is encoded in both cases.

Note, however, that with this patch the layout test will NOT yet fully pass,
since it also handles the fragment part differently.
As the different handling of the fragment part seems to be quite on purpose,
I have not modified the behavior - see the discussion at

http://code.google.com/p/chromium/issues/detail?id=20507 .

BUG=20507, 8912
TEST=LayoutTests/http/tests/uri/resolve-encoding-relative.html
Patch by Roland Steiner, review URL http://codereview.chromium.org/243028

git-svn-id: http://google-url.googlecode.com/svn/trunk@120 8873c55e-713a-0410-88f8-23d9c3d90b1b
src/url_canon_relative.cc