1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-07 04:02:58 +03:00

core, mod_proxy: If a kept_body is present, it becomes safe for

subrequests to support message bodies. Make sure that safety
checks within the core and within the proxy are not triggered
when kept_body is present. This makes it possible to embed
proxied POST requests within mod_include.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@654968 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Graham Leggett
2008-05-09 22:40:01 +00:00
parent 00db8a73d2
commit 1d1c483317
3 changed files with 16 additions and 3 deletions

View File

@@ -266,6 +266,10 @@ static int pass_brigade(apr_bucket_alloc_t *bucket_alloc,
apr_brigade_length(bb, 0, &transferred);
if (transferred != -1)
conn->worker->s->transferred += transferred;
char tmp[1024000];
apr_size_t tlen = 1024000;
apr_brigade_flatten(bb, tmp, &tlen);
printf(tmp, NULL);
status = ap_pass_brigade(origin->output_filters, bb);
if (status != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
@@ -893,8 +897,11 @@ int ap_proxy_http_request(apr_pool_t *p, request_rec *r,
* input_brigade and jump past all of the request body logic...
* Reading anything with ap_get_brigade is likely to consume the
* main request's body or read beyond EOS - which would be unplesant.
*
* An exception: when a kept_body is present, then subrequest CAN use
* pass request bodies, and we DONT skip the body.
*/
if (r->main) {
if (!r->kept_body && r->main) {
/* XXX: Why DON'T sub-requests use keepalives? */
p_conn->close++;
if (old_cl_val) {