HTTP PUT to truncate a file.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux