From d6e357e61a72d2437ac13cb2d44341fb1da80567 Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Thu, 11 Jul 2013 12:11:42 +0000 Subject: [PATCH] Merge r1483027 from trunk: mod_proxy_http: Make the proxy-interim-response environment variable effective by formally overriding origin server behaviour. Submitted by: minfrin Reviewed/backported by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1502198 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ STATUS | 6 ------ modules/proxy/mod_proxy_http.c | 6 +++++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index 7c632c80eb..dce53279f6 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,9 @@ Changes with Apache 2.4.5 URI that is not configured for DAV will trigger a segfault. [Ben Reser ] + *) mod_proxy_http: Make the proxy-interim-response environment variable + effective by formally overriding origin server behaviour. [Graham + Leggett, Co-Advisor ] *) mod_proxy: Fix seg-faults when using the global pool on threaded MPMs [Thomas Eckert , Graham Leggett, diff --git a/STATUS b/STATUS index bc541c4820..f8c2533e19 100644 --- a/STATUS +++ b/STATUS @@ -101,12 +101,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK: 2.4.x patch: http://people.apache.org/~minfrin/httpd-mod_auth_basic-fake4.patch +1: minfrin, jim, druggeri - * mod_proxy_http: Make the proxy-interim-response environment variable - effective by formally overriding origin server behaviour. - trunk patch: http://svn.apache.org/r1483027 - 2.4.x patch: trunk works - +1: minfrin, jim, druggeri - * mod_proxy: Connection header clearing issues trunk patch: https://svn.apache.org/viewvc?view=revision&revision=1481891 https://svn.apache.org/viewvc?view=revision&revision=1482075 diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index 0712b61d5f..f2498b693f 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -1574,12 +1574,16 @@ apr_status_t 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 -- 2.40.0