Re: Curl fails with Debian stable's thttpd HTTP 304
Date: Fri, 8 Apr 2005 12:49:21 +0200 (CEST)
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.htmlReceived on 2005-04-08