cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: Regression: does not ignore HTTP/1.1 headers when -0 is specified

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Wed, 14 Jul 2004 17:25:56 +0200 (CEST)

On Fri, 9 Jul 2004, Toby Peterson wrote:

(CC'ing the reply to the libcurl mailing list, please take follow-ups there.)

> In curl 7.10.2, curl will ignore HTTP/1.1 headers when the -0 option is
> specified. This is useful for downloading files over 2GB from Apache 1.3.x
> servers, which report negative Content-Length (an HTTP 1.1 header). In
> 7.12.0 (and 7.11.x, I'm told), curl honors the HTTP 1.1 headers even when -0
> is specified. So, in 7.12.0 I get this error:
>
> curl: (18) transfer closed with -1559295705 bytes remaining to read

I'm actually not sure what we've done in curl to make this not work anymore.
Or rather, I'm not sure how this ever worked. libcurl has no knowledge what a
"HTTP/1.1 header" is, it just does a few things differently when speaking 1.1
and it treats most received headers the same.

Fixing libcurl by adding ugly work-arounds for stupid servers have been done
before, but is this a widely common problem produced in a repeatable way in
the server end? I mean, could we translate a received negative number to the
"actual" positive amount?

> Apache shouldn't be returning HTTP 1.1 headers to an HTTP 1.0 request, but
> it does. I think the "correct" behavior would be for curl to just ignore the
> 1.1 headers.

Content-Length: is not a 1.1-header. I don't see what header it should skip in
this case.

> Please let me know what you think; we'd like to get 7.12.0 (or whatever's
> new when Mac OS X 10.4 is released) into the system.

I think it would be nice to work with these servers, although it depends on
what kind of change it'll take to do it.

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-07-14

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET