httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Timby <bti...@gmail.com>
Subject [users@httpd] HTTP PUT to truncate a file.
Date Wed, 13 Jul 2011 21:34:52 GMT
I am working with WebDAV on apache and I have figured out how to use
the Content-Range header to append to a file.

Request 1:
HTTP/1.1 PUT /file
Host: node0
Content-Length: 1

a

* /file now: a

Request 2:
HTTP/1.1 PUT /file
Host: node0
Content-Range: 1-4/*
Content-Length: 3

aaa

* /file now: aaaa

Now I would like to truncate a file...

HTTP/1.1 PUT /file
Host: node0
Content-Range: 2-4/*
Content-Length: 0

But this does not work. Any pointers? I can truncate the file to 0
bytes easily, but I want to truncate it to an arbitrary length.

Thanks.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message