cURL / Mailing Lists / curl-library / Single Mail


Re: libcurl stumbles on weird redirect location

From: Daniel Stenberg <>
Date: Tue, 27 Dec 2011 19:07:25 +0100 (CET)

On Sun, 25 Dec 2011, Alex Vinnik wrote:

> You are right about that;**jsessionid=**
> 0000EXsMRFMF5kwJo26qgOif31d:**13ddq0tfm is treated as search term by Chrome
> BUT I am afraid I was not entirely clear that THIS url
> needs to be used as seed one. The server responds with 301 with that weird
> "Location" header. However when you try this seed url in chrome it navigates
> correctly to new location. The mystery for me is that Chrome seems to get
> well-formed location header in contrast to curl. Here is Chrome log captured
> from chrome://net-internals/#events. Please see below...

That's not really strange. The site probably has some nasty and broken
heuristics to figure out what browser that is in use and then it sends back
different responses - including headers.

The Firefox version of the URLs are still wrong.

By the way, my Firefox bug report for this issue is now here: and it seems that Firefox
9 will not treat those URLs as legal ones and then that site might have to do
something else...

> Any special requests headers that make the difference? Wonder if I can
> achieve similar effect with curl.

If you compare both Firefox's and Chrome's "route" you might detect
differences. They may also very well use javascript or whatever to detect
what's in use and act from that.

List admin:
Received on 2011-12-27