cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Test of resuming PUT's with curl and mod-dav

From: Bob Schader <rschader_at_product-des.com>
Date: Sat, 27 Jan 2001 19:07:07 -0500

OK, I have it! The proper Content Range encoding is crucial.
I was pointed to RFC2616, Sec. 14.16:

Examples of byte-content-range-spec values, assuming that the entity
contains a total of 1234 bytes:
The first 500 bytes:
       bytes 0-499/1234
The second 500 bytes:
       bytes 500-999/1234
All except for the first 500 bytes:
       bytes 500-1233/1234
The last 500 bytes:
       bytes 734-1233/1234

The actual header should be formatted like this:
Content-Range: bytes 0-499/1234

I have this working now in my java test app!
Bob Schader

Daniel Stenberg wrote:
>
> On Sat, 27 Jan 2001, Bob Schader wrote:
>
> > According to a recent email from the mod-dev group, "Range" headers are
> > for GET requests, while "Content-Range" headers are for PUT requests.
> > Maybe we have to just change "Range" to "Content-Range".
>
> Hm, maybe we should do better if we read the specs first? ;-)
>
> > I can try this on my test java app I wrote.
>
> Changing to Content-Range: for non-GET requests is a very easy patch. Apply
> the attached one.
>
> An alternative test-approach would be to set a custom header and do a normal
> put with curl:
>
> curl -T FILE -H "Content-Range: bytes=200-300" URL
>
> ... I mean to figure out what the receiving end actually wants.
>
> --
> Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
>
> ------------------------------------------------------------------------
> Name: content_range.patch
> content_range.patch Type: Plain Text (TEXT/PLAIN)
> Encoding: BASE64

_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library
Received on 2001-01-28