]> granicus.if.org Git - apache/commitdiff
mod_proxy_http: Make the proxy-interim-response environment variable
authorGraham Leggett <minfrin@apache.org>
Wed, 15 May 2013 19:27:10 +0000 (19:27 +0000)
committerGraham Leggett <minfrin@apache.org>
Wed, 15 May 2013 19:27:10 +0000 (19:27 +0000)
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

CHANGES
modules/proxy/mod_proxy_http.c

diff --git a/CHANGES b/CHANGES
index 1bedba70addff9d494d440672fbd43c653c3f9d7..a247db179cada9dc4ef61657d292c52d877fbd2d 100644 (file)
--- 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 <coad measurement-factory.com>]
+
   *) 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
index b55b8cf4b0d567992c2ca022fddff8883b2a77b9..55dabba2af35489df4e2426e56a46b0d7b416e05 100644 (file)
@@ -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