cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-1973352 ] Redirect to relative URI (only query string)

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Mon, 26 May 2008 23:30:43 -0700

Bugs item #1973352, was opened at 2008-05-26 20:59
Message generated for change (Settings changed) made by felix-sf191
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1973352&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: http
Group: wrong behaviour
>Status: Open
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Felix (felix-sf191)
Assigned to: Daniel Stenberg (bagder)
Summary: Redirect to relative URI (only query string)

Initial Comment:
I'm trying to load a resource that answers with a relative location header that is just a query string. Curl builds a wrong absolute URI to follow:

Assuming the resource is "http://example.com/blarg/blarg"

Server Response:
HTTP/1.1 302 Found
Date: Mon, 26 May 2008 18:45:57 GMT
Server: Apache
Location: ?x=1

I now would Curl expect to follow to "http://example.com/blarg/blarg?x=1"

But the next request looks like this:
GET /?x=1 HTTP/1.1
Host: example.com
Accept: */*

----------------------------------------------------------------------

>Comment By: Felix (felix-sf191)
Date: 2008-05-27 08:30

Message:
Logged In: YES
user_id=2099045
Originator: YES

I have tried today's snapshot to verify your fix: Works as expected.
Thanks a lot for the quick fix!

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2008-05-26 22:40

Message:
Logged In: YES
user_id=1110
Originator: NO

Fixed and committed to CVS just now. New test case 1031 verifies this. If
you can, please get the code from CVS or tomorrow's daily snapshot and see
that this fix actually corrects the problem for you!

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2008-05-26 22:19

Message:
Logged In: YES
user_id=1110
Originator: NO

What curl version is that? I can't repeat that exact behavior (although I
can see that it won't just append the new query string)

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2008-05-26 22:11

Message:
Logged In: YES
user_id=1110
Originator: NO

Is that what the ordinary browsers do on such redirects?

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1973352&group_id=976
Received on 2008-05-27

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET