From: Nick Kew Date: Sat, 17 Nov 2007 14:36:58 +0000 (+0000) Subject: Safer fix to PR43882 than in r595672. X-Git-Tag: 2.3.0~1249 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=14188af9f1e0f3e4336852321522ccb1db5ce824;p=apache Safer fix to PR43882 than in r595672. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@595954 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_filters.c b/modules/http/http_filters.c index 2f1764d98f..0b5698d925 100644 --- a/modules/http/http_filters.c +++ b/modules/http/http_filters.c @@ -115,11 +115,11 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b, lenp = apr_table_get(f->r->headers_in, "Content-Length"); if (tenc) { - /* RFC2616 allows qualifiers, so use strncasecmp */ - if (!strncasecmp(tenc, "chunked", 7) && !ap_strchr_c(tenc, ',')) { + if (!strcasecmp(tenc, "chunked")) { ctx->state = BODY_CHUNK; } - else { + /* test lenp, because it gives another case we can handle */ + else if (!lenp) { /* Something that isn't in HTTP, unless some future * edition defines new transfer ecodings, is unsupported. */