]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
This patch should address input buffering, requesting only as much from
authorWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 26 Jul 2001 16:05:36 +0000 (16:05 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 26 Jul 2001 16:05:36 +0000 (16:05 +0000)
  the client as the ap_get_client_block() buffer is prepared to accept.

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

modules/http/http_protocol.c

index b8f4b03da5eaf8ca52683543d838119fbf9154bf..e1715ffa50234d192e39208871b006fc64acb01e 100644 (file)
@@ -1435,8 +1435,11 @@ AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer, apr_size_t bu
 
     do {
         if (APR_BRIGADE_EMPTY(bb)) {
+            apr_size_t asmuch = bufsiz;
+            if (r->remaining < asmuch)
+                asmuch = (apr_size_t)r->remaining;
             if (ap_get_brigade(r->input_filters, bb, AP_MODE_BLOCKING,
-                               &r->remaining) != APR_SUCCESS) {
+                               &asmuch) != APR_SUCCESS) {
                 /* if we actually fail here, we want to just return and
                  * stop trying to read data from the client.
                  */