cURL / Mailing Lists / curl-library / Single Mail


Re: curl gets into infinite redirect loop

From: Daniel Stenberg <>
Date: Fri, 30 Dec 2011 20:46:59 +0100 (CET)

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.

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.

List admin:
Received on 2011-12-30