summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2010-07-26 00:08:35 (GMT)
committer Denys Vlasenko <vda.linux@googlemail.com>2010-07-26 00:08:35 (GMT)
commite5dbd56d776ec51281dd6fcc345baf77b4eac953 (patch)
tree260372670e43c8c8f5c12b90dcc60ca4b65bb698
parentba2dcccd799963ac74ee92300df494947820608b (diff)
downloadbusybox-e5dbd56d776ec51281dd6fcc345baf77b4eac953.tar.gz
busybox-e5dbd56d776ec51281dd6fcc345baf77b4eac953.tar.bz2
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 cad45cd..3fea3f0 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -2081,18 +2081,18 @@ static void handle_incoming_and_exit(const len_and_sockaddr *fromAddr)
#endif
#if ENABLE_FEATURE_HTTPD_GZIP
if (STRNCASECMP(iobuf, "Accept-Encoding:") == 0) {
- char *s = iobuf + sizeof("Accept-Encoding:")-1;
- while (*s) {
- ///is "Accept-Encoding: compress,gzip" valid?
- // (that is, no space after ',') -
- // this code won't handle that
- s = skip_whitespace(s);
- if (STRNCASECMP(s, "gzip") == 0)
+ /* Note: we do not support "gzip;q=0"
+ * method of _disabling_ gzip
+ * delivery. No one uses that, though */
+ const char *s = strstr(iobuf, "gzip");
+ if (s) {
+ // want more thorough checks?
+ //if (s[-1] == ' '
+ // || s[-1] == ','
+ // || s[-1] == ':'
+ //) {
content_gzip = 1;
- /* Note: we do not support "gzip;q=0"
- * method of _disabling_ gzip
- * delivery */
- s = skip_non_whitespace(s);
+ //}
}
}
#endif