[PATCH] Announce ability for range requests
The file server now accepts a Range: header, so it would be best to announce this in the response headers. Two lines of code added to fserve.c, patch follows.
--- fserve.c.orig Thu Sep 8 16:03:51 2005 +++ fserve.c Wed Jan 4 15:12:39 2006 @@ -514,6 +514,7 @@ bytes = snprintf (httpclient->refbuf->data, BUFSIZE, "HTTP/1.1 206 Partial Content\r\n" "Date: %s\r\n"
-
"Accept-Ranges: bytes\r\n" "Content-Length: " FORMAT_INT64 "\r\n" "Content-Range: bytes " FORMAT_INT64 \ "-" FORMAT_INT64 "/" FORMAT_INT64 "\r\n"
@@ -548,6 +549,7 @@ httpclient->respcode = 200; bytes = snprintf (httpclient->refbuf->data, BUFSIZE, "HTTP/1.0 200 OK\r\n"
-
"Accept-Ranges: bytes\r\n" "Content-Length: " FORMAT_INT64 "\r\n" "Content-Type: %s\r\n\r\n", content_length,