You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
1.1 KiB
22 lines
1.1 KiB
6 years ago
|
--- a/modules/proxy/mod_proxy_http.c 2014/08/31 16:06:36 1621600
|
||
|
+++ b/modules/proxy/mod_proxy_http.c 2014/08/31 16:07:45 1621601
|
||
|
@@ -1652,6 +1652,18 @@
|
||
|
if (!r->header_only && /* not HEAD request */
|
||
|
(proxy_status != HTTP_NO_CONTENT) && /* not 204 */
|
||
|
(proxy_status != HTTP_NOT_MODIFIED)) { /* not 304 */
|
||
|
+ const char *tmp;
|
||
|
+ /* Add minimal headers needed to allow http_in filter
|
||
|
+ * detecting end of body without waiting for a timeout. */
|
||
|
+ if ((tmp = apr_table_get(r->headers_out, "Transfer-Encoding"))) {
|
||
|
+ apr_table_set(backend->r->headers_in, "Transfer-Encoding", tmp);
|
||
|
+ }
|
||
|
+ else if ((tmp = apr_table_get(r->headers_out, "Content-Length"))) {
|
||
|
+ apr_table_set(backend->r->headers_in, "Content-Length", tmp);
|
||
|
+ }
|
||
|
+ else if (te) {
|
||
|
+ apr_table_set(backend->r->headers_in, "Transfer-Encoding", te);
|
||
|
+ }
|
||
|
ap_discard_request_body(backend->r);
|
||
|
}
|
||
|
return proxy_status;
|