From 5b9b8da66faa946f53318fccf35e25c7c849471e Mon Sep 17 00:00:00 2001 From: Nick Kew Date: Wed, 28 Nov 2007 16:50:28 +0000 Subject: [PATCH] Fix patch to PR#43882 as pointed out by trawick git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@599059 13f79535-47bb-0310-9956-ffa450edef68 --- modules/http/http_filters.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/http/http_filters.c b/modules/http/http_filters.c index 0b5698d925..96f794d236 100644 --- a/modules/http/http_filters.c +++ b/modules/http/http_filters.c @@ -118,7 +118,7 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b, if (!strcasecmp(tenc, "chunked")) { ctx->state = BODY_CHUNK; } - /* test lenp, because it gives another case we can handle */ + /* 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. @@ -135,8 +135,13 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b, ctx->eos_sent = 1; return ap_pass_brigade(f->r->output_filters, bb); } + else { + ap_log_rerror(APLOG_MARK, APLOG_WARN, 0, f->r, + "Unknown Transfer-Encoding: %s; using Content-Length", tenc); + tenc = NULL; + } } - else if (lenp) { + if (lenp && !tenc) { char *endstr; ctx->state = BODY_LENGTH; -- 2.40.0