aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2010-07-26 02:08:35 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-07-26 02:08:35 +0200
commite5dbd56d776ec51281dd6fcc345baf77b4eac953 (patch)
tree260372670e43c8c8f5c12b90dcc60ca4b65bb698
parentba2dcccd799963ac74ee92300df494947820608b (diff)
downloadbusybox-w32-e5dbd56d776ec51281dd6fcc345baf77b4eac953.tar.gz
busybox-w32-e5dbd56d776ec51281dd6fcc345baf77b4eac953.tar.bz2
busybox-w32-e5dbd56d776ec51281dd6fcc345baf77b4eac953.zip
httpd: simplified "gzip" test
function old new delta handle_incoming_and_exit 2830 2807 -23 Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--networking/httpd.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/networking/httpd.c b/networking/httpd.c
index cad45cd5d..3fea3f04c 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -2081,18 +2081,18 @@ static void handle_incoming_and_exit(const len_and_sockaddr *fromAddr)
2081#endif 2081#endif
2082#if ENABLE_FEATURE_HTTPD_GZIP 2082#if ENABLE_FEATURE_HTTPD_GZIP
2083 if (STRNCASECMP(iobuf, "Accept-Encoding:") == 0) { 2083 if (STRNCASECMP(iobuf, "Accept-Encoding:") == 0) {
2084 char *s = iobuf + sizeof("Accept-Encoding:")-1; 2084 /* Note: we do not support "gzip;q=0"
2085 while (*s) { 2085 * method of _disabling_ gzip
2086 ///is "Accept-Encoding: compress,gzip" valid? 2086 * delivery. No one uses that, though */
2087 // (that is, no space after ',') - 2087 const char *s = strstr(iobuf, "gzip");
2088 // this code won't handle that 2088 if (s) {
2089 s = skip_whitespace(s); 2089 // want more thorough checks?
2090 if (STRNCASECMP(s, "gzip") == 0) 2090 //if (s[-1] == ' '
2091 // || s[-1] == ','
2092 // || s[-1] == ':'
2093 //) {
2091 content_gzip = 1; 2094 content_gzip = 1;
2092 /* Note: we do not support "gzip;q=0" 2095 //}
2093 * method of _disabling_ gzip
2094 * delivery */
2095 s = skip_non_whitespace(s);
2096 } 2096 }
2097 } 2097 }
2098#endif 2098#endif