ASF Bugzilla – Attachment 16904 Details for
Bug 37402
mod_proxy has stopped allowing POST sub-requests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
allow POST sub-requests in HTTP proxy (for 2.1-HEAD)
proxy_allow_sub_post-2_1.patch (text/plain), 2.50 KB, created by
Stuart Children
on 2005-11-08 14:32:08 UTC
(
hide
)
Description:
allow POST sub-requests in HTTP proxy (for 2.1-HEAD)
Filename:
MIME Type:
Creator:
Stuart Children
Created:
2005-11-08 14:32:08 UTC
Size:
2.50 KB
patch
obsolete
>--- mod_proxy_http.c.orig 2005-11-08 11:05:34.000000000 +0000 >+++ mod_proxy_http.c 2005-11-08 12:25:57.000000000 +0000 >@@ -802,27 +802,36 @@ > /* We have headers, let's figure out our request body... */ > input_brigade = apr_brigade_create(p, bucket_alloc); > >- /* sub-requests never use keepalives, and mustn't pass request bodies. >- * Because the new logic looks at input_brigade, we will self-terminate >- * 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. >- */ > if (r->main) { >+ /* sub-requests never use keepalives */ > /* XXX: Why DON'T sub-requests use keepalives? */ > p_conn->close++; >- if (old_cl_val) { >- old_cl_val = NULL; >- apr_table_unset(r->headers_in, "Content-Length"); >- } >- if (old_te_val) { >- old_te_val = NULL; >- apr_table_unset(r->headers_in, "Transfer-Encoding"); >+ >+ /* Most sub-requests will be GETs (from SSIs). These do >+ * not have request bodies, but may have a C-L or T-E header >+ * taken from the main request. These need to be removed. >+ * Because the new logic looks at input_brigade, we will self-terminate >+ * 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. >+ * If another module generates POST sub-requests, it should >+ * take care to provide a request body via the input filter, and >+ * set an appropriate C-L or T-E. >+ */ >+ if (r->method_number != M_POST) { >+ if (old_cl_val) { >+ old_cl_val = NULL; >+ apr_table_unset(r->headers_in, "Content-Length"); >+ } >+ if (old_te_val) { >+ 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; > } >- rb_method = RB_STREAM_CL; >- e = apr_bucket_eos_create(input_brigade->bucket_alloc); >- APR_BRIGADE_INSERT_TAIL(input_brigade, e); >- goto skip_body; > } > > /* WE only understand chunked. Other modules might inject
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 37402
: 16904 |
16907