From 14188af9f1e0f3e4336852321522ccb1db5ce824 Mon Sep 17 00:00:00 2001 From: Nick Kew Date: Sat, 17 Nov 2007 14:36:58 +0000 Subject: [PATCH] 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 --- modules/http/http_filters.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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. */ -- 2.40.0