curl-library
Re: redirects and their bodies
Date: Thu, 28 Jul 2005 15:38:44 +0200
Hi Daniel Stenberg, you wrote:
> On Wed, 27 Jul 2005, Michael Wallner wrote:
>
>> So my application fails because I get an invalid HTTP message from
>> curl telling me a Content-Length of 214, while I don't get a body... :-/
>
>
> When you set CURLOPT_FOLLOWLOCATION, you ask libcurl to follow locations
> and then it provides the body of the final page and not from any of
> those that contain the Location: headers. That's a design decision I
> made many eons ago.
>
> If you want the full bodies, don't ask libcurl to follow the redirects
> but handle that yourself.
>
> Or optionally, convince us why this is a handy feature and provide a
> patch that introduces this feature!
Actually, the more I think about it... it seems that I can't do with
curl and its callbacks what I want. Curl has lots of builtin features
I couldn't find anywhere else on the web yet, but for me it's important
that I get unmodified raw response data. At the end it seems that I'll
need to do everything through the debug callback, because it will pass
through the bits it's received unchanged.
Thanks for your time,
-- Michael - < mike(@)php.net >Received on 2005-07-28