cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl gets into infinite redirect loop

From: Alex Vinnik <alvinnik.g_at_gmail.com>
Date: Fri, 30 Dec 2011 14:25:41 -0600

On Fri, Dec 30, 2011 at 1:46 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Thu, 29 Dec 2011, Alex Vinnik wrote:
>
> Added strtolower function to http.c. Was not sure if libcurl has similar
>> function. See code diff below. It fixed the problem! curl now gets to the
>> final destination. Run all tests.
>>
>
> Thanks for verifying this. The fact that all tests still run fine only
> tells us that we don't do proper mixed case host name tests...
>
> I took this issue to the httpbis mailing list (
> http://lists.w3.org/Archives/**Public/ietf-http-wg/**2011OctDec/0582.html<http://lists.w3.org/Archives/Public/ietf-http-wg/2011OctDec/0582.html>)
> and so far all agree that lower casing unconditionally is wrong,
> protocol-wise. I would rather work on making sure we switch to the host
> name as given in the Location: header even when the connection is re-used.
>
> I haven't yet looked at the code to consider how this should be done.
>
> Thanks for looking into it. This approach looks very balanced to me. Let
me know if some help is needed.

> A downside with this approach is of course if sites start rejecting
> requests entirely based on case sensitive matches instead of "just"
> redirecting over to the lower case version.
>
> Well... in this case common browsers should start failing handling such
sites and hopefully this behavior will be noticed by site owners and fixed.

> --
>
> / daniel.haxx.se
> ------------------------------**------------------------------**-------
> List admin: http://cool.haxx.se/list/**listinfo/curl-library<http://cool.haxx.se/list/listinfo/curl-library>
> Etiquette: http://curl.haxx.se/mail/**etiquette.html<http://curl.haxx.se/mail/etiquette.html>
>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-12-30