about summary refs log tree commit homepage
path: root/http_get.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2012-10-26 08:20:10 +0000
committerEric Wong <normalperson@yhbt.net>2012-10-26 08:20:10 +0000
commite2a1d55001e8bece2700f9199fdf714b0af6460a (patch)
tree078b17adc2120d6df4ff9702ee567cecc3146c78 /http_get.c
parent036f96c7133bebde4a89f7219be044c0a6e82edf (diff)
downloadcmogstored-e2a1d55001e8bece2700f9199fdf714b0af6460a.tar.gz
Most HTTP parsers are lax in the way they handle the '\r' for
headers, but strict HTTP parsers may have trouble handling a
missing '\r'.
Diffstat (limited to 'http_get.c')
-rw-r--r--http_get.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/http_get.c b/http_get.c
index 5812eb1..2bfcaa4 100644
--- a/http_get.c
+++ b/http_get.c
@@ -107,7 +107,7 @@ static void http_get_resp_hdr(struct mog_http *http, struct stat *sb)
                         "Last-Modified: %s\r\n"
                         "Content-Length: %lld\r\n"
                         "Content-Type: application/octet-stream\r\n"
-                        "Content-Range: bytes %lld-%lld/%lld\n"
+                        "Content-Range: bytes %lld-%lld/%lld\r\n"
                         "Connection: %s\r\n"
                         "\r\n",
                         now->httpdate,
@@ -150,7 +150,7 @@ bad_range:
                         "Date: %s\r\n"
                         "Content-Length: 0\r\n"
                         "Content-Type: text/plain\r\n"
-                        "Content-Range: bytes */%lld\n"
+                        "Content-Range: bytes */%lld\r\n"
                         "Connection: %s\r\n"
                         "\r\n",
                         now->httpdate,