Shttpd 1.39 fixed a bug in 1.38 where HTTP PUT requests always result in 
empty files, no matter what the content.

However, 1.39 and up to 1.41 have a bug where, if the content is shorter 
than the header,  the client is never sent 200 OK, and the connection 
times out, because the completion test is on the header length, not the 
content length. The fix is:
*** shttpd-1.41/src/io_file.c   Sun Jun  1 04:30:09 2008
--- shttpd-1.41-local/src/io_file.c     Sat Jun 14 18:00:24 2008
***************
*** 22,28 ****

         DBG(("put_file(%p, %d): %d bytes", (void *) stream, (int) len, n));

!       if (n <= 0 || (rem->io.total >= (big_int_t) rem->headers_len)) {
                 (void) fstat(fd, &st);
                 stream->io.head = stream->headers_len =
                     my_snprintf(stream->io.buf,
--- 22,28 ----

         DBG(("put_file(%p, %d): %d bytes", (void *) stream, (int) len, n));

!       if (n <= 0 || (rem->io.total >= (big_int_t) rem->content_len)) {
                 (void) fstat(fd, &st);
                 stream->io.head = stream->headers_len =
                     my_snprintf(stream->io.buf,

Cheers,
Peter

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
shttpd-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shttpd-general

Reply via email to