From 98f1c628834f476bc12c1088b67b322ece389a3c Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Tue, 10 Apr 2001 20:55:05 +0000 Subject: [PATCH] A client POST request would be read entirely into RAM before sending it on the client - a potential DoS. Fixed. PR: Obtained from: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88799 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/proxy_http.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c index e99aa2e653..753e719f59 100644 --- a/modules/proxy/proxy_http.c +++ b/modules/proxy/proxy_http.c @@ -558,17 +558,15 @@ int ap_proxy_http_handler(request_rec *r, char *url, /* send the request data, if any. */ if (ap_should_client_block(r)) { while ((i = ap_get_client_block(r, buffer, sizeof buffer)) > 0) { -/* XXX FIXME: Only sends downstream when request is fully loaded */ e = apr_bucket_pool_create(buffer, i, p); APR_BRIGADE_INSERT_TAIL(bb, e); + e = apr_bucket_flush_create(); + APR_BRIGADE_INSERT_TAIL(bb, e); + ap_pass_brigade(origin->output_filters, bb); + apr_brigade_cleanup(bb); } } - /* Flush the data to the origin server */ - e = apr_bucket_flush_create(); - APR_BRIGADE_INSERT_TAIL(bb, e); - ap_pass_brigade(origin->output_filters, bb); - /* * Step Four: Receive the Response -- 2.40.0