]> granicus.if.org Git - apache/commitdiff
Fix patch to PR#43882 as pointed out by trawick
authorNick Kew <niq@apache.org>
Wed, 28 Nov 2007 16:50:28 +0000 (16:50 +0000)
committerNick Kew <niq@apache.org>
Wed, 28 Nov 2007 16:50:28 +0000 (16:50 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@599059 13f79535-47bb-0310-9956-ffa450edef68

modules/http/http_filters.c

index 0b5698d925bfa09f18b0ac71806525a0be040ad7..96f794d236d8b0da5532ab27ca3373e80dd09926 100644 (file)
@@ -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;