cURL / Mailing Lists / curl-library / Single Mail


Re: curl gets into infinite redirect loop

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

On Fri, Dec 30, 2011 at 1:46 PM, Daniel Stenberg <> 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 (
> 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.

> --
> /
> ------------------------------**------------------------------**-------
> List admin:**listinfo/curl-library<>
> Etiquette:**etiquette.html<>

List admin:
Received on 2011-12-30