From: Graham Leggett Date: Wed, 15 May 2013 19:27:10 +0000 (+0000) Subject: mod_proxy_http: Make the proxy-interim-response environment variable X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bec94f831437bcb7a54fdd8cae8f13078a8cae99;p=thirdparty%2Fapache%2Fhttpd.git mod_proxy_http: Make the proxy-interim-response environment variable effective by formally overriding origin server behaviour. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1483027 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 1bedba70add..a247db179ca 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,10 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) mod_proxy_http: Make the proxy-interim-response environment variable + effective by formally overriding origin server behaviour. [Graham + Leggett, Co-Advisor ] + *) core: Stop the HTTP_IN filter from attempting to write error buckets to the output filters, which is bogus in the proxy case. Create a clean mapping from APR codes to HTTP status codes, and use it where diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index b55b8cf4b0d..55dabba2af3 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -1532,12 +1532,16 @@ int ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, * behaviour here might break something. * * So let's make it configurable. + * + * We need to set "r->expecting_100 = 1" otherwise origin + * server behaviour will apply. */ const char *policy = apr_table_get(r->subprocess_env, "proxy-interim-response"); ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, "HTTP: received interim %d response", r->status); - if (!policy || !strcasecmp(policy, "RFC")) { + if (!policy + || (!strcasecmp(policy, "RFC") && ((r->expecting_100 = 1)))) { ap_send_interim_response(r, 1); } /* FIXME: refine this to be able to specify per-response-status