cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-1339230 ] Curl sends incorrect Ranges header

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Thu, 27 Oct 2005 05:06:28 -0700

Bugs item #1339230, was opened at 2005-10-27 09:16
Message generated for change (Settings changed) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1339230&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: http
Group: bad behaviour
>Status: Closed
>Resolution: Fixed
>Priority: 2
Submitted By: Jaz Fresh (jazfresh)
Assigned to: Daniel Stenberg (bagder)
Summary: Curl sends incorrect Ranges header

Initial Comment:
When using the --range option, it is possible to
specify a malformed "Range" header to the webserver.

The docs say that "--range 9500" "specifies the bytes
from offset 9500 and forward". However if this type of
range is specified on the command line, the actual
range header that is sent is:

"Range: 9500"

This is incorrect, because it does not fit in with the
HTTP/1.1 Range header specification.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35

The specification states that a range with a start
boundary but no end boundary should be written as
"<start>-". So in this case, the above example should
actually read:

"Range: 9500-"

It would be nice if you could either:
- Warn the user if they attempt to send a single digit
as a range
or
- Detect that the user has specified a single digit as
a range and automatically append a '-' to it in the header.

----------------------------------------------------------------------

>Comment By: Daniel Stenberg (bagder)
Date: 2005-10-27 14:06

Message:
Logged In: YES
user_id=1110

Thanks for pointing this out. Starting now, curl will warn
for this usage and append a dash (-) to the given number.

Fix was just committed to CVS.

----------------------------------------------------------------------

Comment By: Jaz Fresh (jazfresh)
Date: 2005-10-27 09:18

Message:
Logged In: YES
user_id=1216898

Sorry, slight inaccuracy in my description. The actual range
sent is
"Range: bytes=9500"
and should be:
"Range: bytes=9500-"

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1339230&group_id=976
Received on 2005-10-27

These mail archives are generated by hypermail.

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

File upload with ASP.NET