cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problem with Location header redirect

From: Dobromir Velev <diadomraz_at_gmail.com>
Date: Sat, 2 Dec 2006 11:08:56 +0200

Thanks for checking this out.

I also noticed that there is no Conent-length header and it is what is
causing the problem. I'm now trying to add a workaround in lib/transfer.c to
avoid the timeout error for this particular case.

Regards
Dobromir Velev

On 12/1/06, Daniel Stenberg <daniel_at_haxx.se> wrote:
>
> On Fri, 1 Dec 2006, Dobromir Velev wrote:
>
> > I'm experiencing some very strange timeouts before following a Location
> > redirect. I'm sending a simple POST request to a page which responds
> with
> > 302 Moved status and a Location redirect. Curl sends the request and
> parses
> > the response properly, but then it timeouts before trying to send the
> second
> > request to the new page.
> >
> > Any ideas?
>
> The response looks badly formatted and it confused libcurl - it doesn't
> know
> when the response ends. It is HTTP 1.1 (thus persistent by default) but
> has no
> Content-Length, no chunked encoding, no conection: close and it seems the
> connection isn't closed after the response.
>
> The next libcurl version will skip reading that response body as it is a
> HTTP
> violation.
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
>

-- 
Dobromir Velev
---------------------------------------------------------------------------
"Never attribute to malice that which can be
adequately explained by stupidity"
Received on 2006-12-02