curl-library
Re: libcurl stumbles on weird redirect location
Date: Sun, 25 Dec 2011 19:18:29 +0100 (CET)
On Sat, 24 Dec 2011, Alex Vinnik wrote:
> I am having a problem using libcurl in my Ruby app (Curb gem binds directly
> to libcurl). Specifically libcurl can't follow a weird redirect served by a
> web server. Server Location header "Location:
> http://www.officedepot.com;jsessionid=0000EXsMRFMF5kwJo26qgOif31d:13ddq0tfm"
> doesn't look RFC complaint to me. For whatever reason jsessionid gets added
> to the end of new location.
Wow. That's a broken URL that I've not seen used before.
> Somehow browsers can handle this redirect.
I pasted that URL into chrome, and it can't deal with it when given in the
address bar at least. It treats it as a search string instead.
I pasted it into Firefox's URL bar and it inserted a slash in front of the
first semicolon by itself and then showed the site.
So browsers at least aren't uniformly considering this a good address.
> if there is a way to work around this problem?
No, I can't think of any.
Since this is a fairly big site and at least one of the major browsers support
this format, I think we should consider supporting it. Even though it would be
under protest.
Any other opinions?
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2011-12-25