]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Backport the fix to an edge case; it's now much more efficient to
authorWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 8 Aug 2005 01:26:34 +0000 (01:26 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 8 Aug 2005 01:26:34 +0000 (01:26 +0000)
  entirely skip request body determinations for subrequests, stuff
  in an EOS and we are off to the races, ready to create a body-less
  proxied subrequest.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/proxy-reqbody-2.0.x@230725 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/proxy_http.c

index addaf7e40a07d46634c825ccdbb4f35a49a84e8e..00bdb806059141f428e05fbea6c98f36880ce805 100644 (file)
@@ -1031,6 +1031,10 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
             old_te_val = NULL;
             apr_table_unset(r->headers_in, "Transfer-Encoding");
         }
+        rb_method = RB_STREAM_CL;
+        e = apr_bucket_eos_create(input_brigade->bucket_alloc);
+        APR_BRIGADE_INSERT_TAIL(input_brigade, e);
+        goto skip_body;
     }
 
     /* Prefetch MAX_MEM_SPOOL bytes
@@ -1125,6 +1129,9 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
         }
     }
 
+/* Yes I hate gotos.  This is the subrequest shortcut */
+skip_body:
+
     switch(rb_method) {
     case RB_STREAM_CHUNKED:
         status = stream_reqbody_chunked(p, r, p_conn, origin, bb,