httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Timby <>
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


* /file now: a

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


* /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.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message