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: */*
Logged In: YES
user_id=1110
Originator: NO
Is that what the ordinary browsers do on such redirects?
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)
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!
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!
Logged In: YES
user_id=1110
Originator: NO
Thanks for verifying. Case closed!