cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl fails with Debian stable's thttpd HTTP 304

From: Cory Nelson <phrosty_at_gmail.com>
Date: Fri, 8 Apr 2005 04:17:10 -0700

7.13.2

The real code is here:
http://cvs.sourceforge.net/viewcvs.py/peerguardian/pg2/pg2/updatelists.cpp?view=markup

But essentially just using a multi handle and when I get CURLMSG_DONE,
msg->data.result!=CURLE_OK

On Apr 8, 2005 3:49 AM, Daniel Stenberg <daniel-curl_at_haxx.se> wrote:
> On Fri, 8 Apr 2005, Cory Nelson wrote:
>
> > Curl fails with a "transfer closed with * bytes remaining to read" when
> > Debian stable's thttpd responds with a 304 Not Modified. It seems this is
> > because of thttpd including Content-Length in the response headers:
>
> Indeed. As I read section 10.3.5 in RFC2616, the phrase "the response MUST NOT
> include other entity-headers" implies this.
>
> > I realise this is more of an oddity of thttpd (it has been removed in a
> > future version) but aren't HTTP clients supposed to ignore headers that
> > don't make sense for the response?
>
> There akready is code in libcurl that is written to ignore the Content-Length
> of a 304 response. (Around line 700 in lib/transfer.c)
>
> What libcurl version is this? What kind of conditional did you use? I would
> like to add a test case for this and try it myself.
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
>

-- 
Cory Nelson
http://www.int64.org
Received on 2005-04-08