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 12:16:45 -0500

I just tried changing Range to Content-Range in my java test app
and mod-dev still appears to overwrite the file with each
request sent so I think something is wrong there.

Bob Schader wrote:
>
> Daniel,
> 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". I
> can try this on my test java app I wrote. Here is the message
> from the mod-dav email:
>
> Joe Orton wrote:
> >
> > On Fri, Jan 26, 2001 at 09:57:27PM -0500, Bob Schader wrote:
> > > I wrote a test java application which attempts to PUT a file
> > > to our web server using 4096 byte chunks and setting the
> > > Range header for each chunk when it is sent.
> > ...
> > > Here is the log capture:
> > >
> > > PUT http://smtp.product-des.com:80/public/incoming/test.zip HTTP/1.1
> > >
> > > Range: bytes=1-4096
> >
> > The "Range" request header is for *requesting* byte-ranges from the
> > server, typically (only?) in a GET request.
> >
> > If you want to say "I am giving you this range of bytes for the
> > resource" (as server or client), you want to use the Content-Range
> > header.
> >
> > Regards,
> >
> > joe
>
> Daniel Stenberg wrote:
> >
> > On Fri, 26 Jan 2001, Bob Schader wrote:
> >
> > > I applied the patch and compiled curl fine on both Cygwin and Linux, I
> > > tested the append capability and it looks like we may be half way there.
> > > I tried the perl httpserver test, but can't find where it saves any data
> > > to.
> >
> > You'll find the data in 'log/server.input'. When I tried a command line like
> > "../src/curl -T README -C 2500 http://localhost:8980/hej.html"
> >
> > I got a log/server.input that contains:
> >
> > ---- start ----
> > PUT /hej.html HTTP/1.0
> > Range: bytes=2500-
> > User-Agent: curl/7.6-pre4 (i686-pc-linux-gnu) libcurl 7.6-pre4 (SSL 0.9.5)
> > (ipv6 enabled)
> > Host: localhost:8980
> > Pragma: no-cache
> > Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
> > Content-Length: 161
> >
> > of the ftp server. It uses a simple syntax that is left to
> > describe here!
> >
> > FIX:
> >
> > * Make httpserver.pl work when we PUT without Content-Length:
> > ---- end ----
> >
> > > So I tried a similar test using mod-dav, first I uploaded the curl
> > > Makefile in it's entirety, then I cut about 10 lines off the end on the
> > > server (about 376 bytes). I then attempted to append the Makefile with
> > > curl, and sure enough, it only sent the last 376 bytes of the file, but
> > > guess how big the uploaded file is? 376 bytes!
> >
> > So that means it worked, right? That means you can do what you want to do,
> > even if it takes one extra operation to get the initial size?
> >
> > --
> > Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
> >
> > _______________________________________________
> > Curl-library mailing list
> > Curl-library_at_lists.sourceforge.net
> > http://lists.sourceforge.net/lists/listinfo/curl-library
>
> _______________________________________________
> Curl-library mailing list
> Curl-library_at_lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/curl-library

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