You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2007/05/01 15:22:28 UTC

svn commit: r534068 - in /httpd/httpd/branches/2.2.x: CHANGES docs/manual/mod/mod_proxy.xml modules/proxy/mod_proxy_http.c

Author: jim
Date: Tue May  1 06:22:27 2007
New Revision: 534068

URL: http://svn.apache.org/viewvc?view=rev&rev=534068
Log:
Merge r527969 from trunk:

HTTP proxy ProxyErrorOverride: Leave 1xx and 3xx responses alone.  Only
processing of error responses (4xx, 5xx) will be altered.

PR: 39245

This is based on a patch submitted by Bart van der Schans <schans hippo.nl>
and tweaked slightly by me based on discussions on dev@ since April 2006.
I think rpleum was the first to mention the 1xx issue.


Submitted by: trawick
Reviewed by: jim

Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy.xml
    httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?view=diff&rev=534068&r1=534067&r2=534068
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Tue May  1 06:22:27 2007
@@ -1,6 +1,10 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.2.5
 
+  *) HTTP proxy ProxyErrorOverride: Leave 1xx and 3xx responses alone.  Only
+     processing of error responses (4xx, 5xx) will be altered.  PR 39245.
+     [Jeff Trawick, Bart van der Schans <schans hippo.nl>]
+
   *) htdbm: Enable crypt support on platforms with crypt() but not
      <crypt.h>, such as z/OS. [David Jones <oscaremma gmail.com>]
 

Modified: httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy.xml?view=diff&rev=534068&r1=534067&r2=534068
==============================================================================
--- httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy.xml (original)
+++ httpd/httpd/branches/2.2.x/docs/manual/mod/mod_proxy.xml Tue May  1 06:22:27 2007
@@ -1156,6 +1156,9 @@
     the error code and act accordingly (default behavior would display
     the error page of the proxied server, turning this on shows the SSI
     Error message).</p>
+
+    <p>This directive does not affect the processing of informational (1xx),
+    normal success (2xx), or redirect (3xx) responses.</p>
 </usage>
 </directivesynopsis>
 

Modified: httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c?view=diff&rev=534068&r1=534067&r2=534068
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c (original)
+++ httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c Tue May  1 06:22:27 2007
@@ -1455,7 +1455,7 @@
              * if we are overriding the errors, we can't put the content
              * of the page into the brigade
              */
-            if (!conf->error_override || ap_is_HTTP_SUCCESS(r->status)) {
+            if (!conf->error_override || !ap_is_HTTP_ERROR(r->status)) {
                 /* read the body, pass it to the output filters */
                 apr_read_type_e mode = APR_NONBLOCK_READ;
                 int finish = FALSE;
@@ -1564,7 +1564,7 @@
 
     if (conf->error_override) {
         /* the code above this checks for 'OK' which is what the hook expects */
-        if (ap_is_HTTP_SUCCESS(r->status))
+        if (!ap_is_HTTP_ERROR(r->status))
             return OK;
         else {
             /* clear r->status for override error, otherwise ErrorDocument