]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_proxy_http: follow up to r1853561.
authorYann Ylavic <ylavic@apache.org>
Thu, 14 Feb 2019 08:45:36 +0000 (08:45 +0000)
committerYann Ylavic <ylavic@apache.org>
Thu, 14 Feb 2019 08:45:36 +0000 (08:45 +0000)
Handle "proxy-sendextracrlf" within the loop too.

Btw, this extra CRLF heresy should go (at least in trunk)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1853566 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy_http.c

index 06f3ace5a749b56f64b943b282c3ab1da3ce435b..e4902192db5a80233243378cc0c77c6db1175bc7 100644 (file)
@@ -364,6 +364,11 @@ static int stream_reqbody_chunked(proxy_http_req_t *req)
                                                CRLF_ASCII,
                                                5, bucket_alloc);
                 APR_BRIGADE_INSERT_TAIL(input_brigade, e);
+
+                if (apr_table_get(r->subprocess_env, "proxy-sendextracrlf")) {
+                    e = apr_bucket_immortal_create(CRLF_ASCII, 2, bucket_alloc);
+                    APR_BRIGADE_INSERT_TAIL(input_brigade, e);
+                }
             }
         }
 
@@ -380,14 +385,7 @@ static int stream_reqbody_chunked(proxy_http_req_t *req)
         }
     } while (!seen_eos);
 
-    if (apr_table_get(r->subprocess_env, "proxy-sendextracrlf")) {
-        e = apr_bucket_immortal_create(CRLF_ASCII, 2, bucket_alloc);
-        APR_BRIGADE_INSERT_TAIL(input_brigade, e);
-    }
-
-    /* Now we have headers-only, or the chunk EOS mark; flush it */
-    return ap_proxy_pass_brigade(bucket_alloc, r, p_conn, req->origin,
-                                 input_brigade, 1);
+    return OK;
 }
 
 static int stream_reqbody_cl(proxy_http_req_t *req)