]> granicus.if.org Git - apache/commitdiff
Merge r1483027 from trunk:
authorJim Jagielski <jim@apache.org>
Thu, 11 Jul 2013 12:11:42 +0000 (12:11 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 11 Jul 2013 12:11:42 +0000 (12:11 +0000)
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
STATUS
modules/proxy/mod_proxy_http.c

diff --git a/CHANGES b/CHANGES
index 7c632c80eb33f4c6230690da6699b72ed748688c..dce53279f60b23709cde7892a2b4c6093d2431b9 100644 (file)
--- 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
      <ben reser.org>]
 
+  *) 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>]
 
   *) mod_proxy: Fix seg-faults when using the global pool on threaded
      MPMs [Thomas Eckert <thomas.r.w.eckert gmail.com>, Graham Leggett,
diff --git a/STATUS b/STATUS
index bc541c4820df30f5e86e1ebfe7c1bd8e5425f46a..f8c2533e1956c4849d1c3919a8e185baa98a35e7 100644 (file)
--- 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
index 0712b61d5f1b7bb3faa0d991af226d47cb9bc2ad..f2498b693f1383058d8e1b765e8a2ceb89ab9a8b 100644 (file)
@@ -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