diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-02-04 23:19:30 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-02-04 23:19:30 +0100 |
commit | 8cc1ab3c11538773389060005ba9c053fae0f848 (patch) | |
tree | 93c2ae05dd6177b2eed4fd374ca3fc45dd1e28f8 | |
parent | 8762512fdb088acefb9f3ea5f7b1e1bf2d336ff3 (diff) | |
download | busybox-w32-8cc1ab3c11538773389060005ba9c053fae0f848.tar.gz busybox-w32-8cc1ab3c11538773389060005ba9c053fae0f848.tar.bz2 busybox-w32-8cc1ab3c11538773389060005ba9c053fae0f848.zip |
httpd: use "Content-Length", not "-length"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | networking/httpd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/networking/httpd.c b/networking/httpd.c index 8703fbd3d..e072f23c7 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -1147,7 +1147,7 @@ static void send_headers(int responseNum) | |||
1147 | "Last-Modified: %s\r\n" | 1147 | "Last-Modified: %s\r\n" |
1148 | "%s %"OFF_FMT"u\r\n", | 1148 | "%s %"OFF_FMT"u\r\n", |
1149 | date_str, | 1149 | date_str, |
1150 | content_gzip ? "Transfer-length:" : "Content-length:", | 1150 | content_gzip ? "Transfer-Length:" : "Content-Length:", |
1151 | file_size | 1151 | file_size |
1152 | ); | 1152 | ); |
1153 | } | 1153 | } |
@@ -2276,14 +2276,14 @@ static void handle_incoming_and_exit(const len_and_sockaddr *fromAddr) | |||
2276 | 2276 | ||
2277 | #if ENABLE_FEATURE_HTTPD_CGI || ENABLE_FEATURE_HTTPD_PROXY | 2277 | #if ENABLE_FEATURE_HTTPD_CGI || ENABLE_FEATURE_HTTPD_PROXY |
2278 | /* Try and do our best to parse more lines */ | 2278 | /* Try and do our best to parse more lines */ |
2279 | if ((STRNCASECMP(iobuf, "Content-length:") == 0)) { | 2279 | if ((STRNCASECMP(iobuf, "Content-Length:") == 0)) { |
2280 | /* extra read only for POST */ | 2280 | /* extra read only for POST */ |
2281 | if (prequest != request_GET | 2281 | if (prequest != request_GET |
2282 | # if ENABLE_FEATURE_HTTPD_CGI | 2282 | # if ENABLE_FEATURE_HTTPD_CGI |
2283 | && prequest != request_HEAD | 2283 | && prequest != request_HEAD |
2284 | # endif | 2284 | # endif |
2285 | ) { | 2285 | ) { |
2286 | tptr = skip_whitespace(iobuf + sizeof("Content-length:") - 1); | 2286 | tptr = skip_whitespace(iobuf + sizeof("Content-Length:") - 1); |
2287 | if (!tptr[0]) | 2287 | if (!tptr[0]) |
2288 | send_headers_and_exit(HTTP_BAD_REQUEST); | 2288 | send_headers_and_exit(HTTP_BAD_REQUEST); |
2289 | /* not using strtoul: it ignores leading minus! */ | 2289 | /* not using strtoul: it ignores leading minus! */ |