mod_dav -- Small Files Corrupt if locked first

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

 



Working on setting up file upload via DAV and I've found an odd problem...

If a file is <= 8192 bytes AND I've placed a protective lock on the file before sending, it will be corrupted.

If I don't put a write lock before sending the file, it arrives fine. If I send something > 8192 bytes protective locks are OK.

I'm not sure if this was fixed in a later HTTPD, I don't have the option of upgading =/. I couldn't find anything in Bugzilla, and I've dumped the data posted to Apache via the DAV client, and that is correct.

Any thoughts?  Test case/Apache info below
-Greg

DAV Client: Perl HTTP::DAV 0.31 / dave
Apache Info:
    Apache/2.0.55 (Unix) mod_ssl/2.0.55
   OpenSSL/0.9.8a DAV/2 mod_perl/1.999.21 Perl/v5.8.6

Test case:

Test files and correct MD5s:
   $ dd if=/dev/urandom of=test-8k.bin bs=8k count=1
   $ dd if=/dev/urandom of=test-8.nk.bin bs=8193 count=1
   $ md5sum test-8k.bin test-8.nk.bin
   629d17eb9106740898ead91f88c55181  test-8k.bin
   1bd8d5c63f391881b5c68c294f3e8a58  test-8.nk.bin

   $ dave -u user -p 'pass' https://davhost:davport/blah/
   Duplicate specification "man|?" for option "?"
   ...

(1) File Corrupted if lock issued:

dave> lock test-8k.bin
dave> put test-8k.bin test-8k.bin
  put https://(uri)/test-8k.bin (8192 bytes) (success)
dave> unlock test-8k.bin

(2) File not corrupt (8192 byte) / no lock:
dave> put test-8k.bin test-8k.bin

  $ md5sum test-8k.bin
  a1f8386ab62fc5acd73e694f255af6a6  test-8k.bin

(2) File not corrupt (8193 bytes):

dave> lock test-8.nk.bin
dave> put test-8.nk.bin test-8.nk.bin
  put https://(uri)/test-8.nk.bin (8193 bytes) (success)
dave> unlock test-8.nk.bin



---------------------------------------------------------------------
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