From 98d9dc78407eff15ebf566fe08df2e1b4fd18baf Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 19 Oct 2010 20:20:06 +0200 Subject: URL-parsing: consider ? a divider The URL parser got a little stricter as it now considers a ? to be a host name divider so that the slightly sloppier URLs work too. The problem that made me do this change was the reported problem with an URL like: www.example.com?email=name@example.com This form of URL is not really a legal URL (due to the missing slash after the host name) but is widely accepted by all major browsers and libcurl also already accepted it, it was just the '@' letter that triggered the problem now. The side-effect of this change is that now libcurl no longer accepts the ? letter as part of user-name or password when given in the URL, which it used to accept (and is tested in test 191). That letter is however mentioned in RFC3986 to be required to be percent encoded since it is used as a divider. Bug: http://curl.haxx.se/bug/view.cgi?id=3090268 --- tests/data/test1118 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 tests/data/test1118 (limited to 'tests/data/test1118') diff --git a/tests/data/test1118 b/tests/data/test1118 new file mode 100644 index 000000000..bc776aff6 --- /dev/null +++ b/tests/data/test1118 @@ -0,0 +1,55 @@ + + + +HTTP +HTTP GET + + + +# +# Server-side + + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT +ETag: "21025-dc7-39462498" +Accept-Ranges: bytes +Content-Length: 6 +Connection: close +Content-Type: text/html +Funny-head: yesyes + +-foo- + + + +# +# Client-side + + +http + + +URL without slash and @-letter in query + + +http://%HOSTIP:%HTTPPORT?email=name@example.com/1118 + + + +# +# Verify data after the test has been "shot" + + +^User-Agent:.* + + +GET /?email=name@example.com/1118 HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +Accept: */* + + + + -- cgit v1.2.3