httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject cvs commit: httpd-2.0/modules/proxy proxy_http.c
Date Mon, 05 Nov 2001 23:06:55 GMT
ianh        01/11/05 15:06:55

  Modified:    modules/proxy proxy_http.c
  Log:
  Fix so that errordocument works when a error gets returned from the
  proxy.
  Problem was ErrorHandler thought it was in some kind of recursion and
  couldn't find the custom error document
  Obtained from: Jin Hong <jinh@cnet.com>
  Reviewed by:   Ian Holsman
  
  Revision  Changes    Path
  1.106     +9 -2      httpd-2.0/modules/proxy/proxy_http.c
  
  Index: proxy_http.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_http.c,v
  retrieving revision 1.105
  retrieving revision 1.106
  diff -u -r1.105 -r1.106
  --- proxy_http.c	2001/10/29 15:44:03	1.105
  +++ proxy_http.c	2001/11/05 23:06:55	1.106
  @@ -857,8 +857,15 @@
           /* the code above this checks for 'OK' which is what the hook expects */
           if ( r->status == HTTP_OK )
               return OK;
  -        else 
  -            return r->status;
  +        else  {
  +            /* clear r->status for override error, otherwise ErrorDocument
  +             * thinks that this is a recursive error, and doesn't find the
  +             * custom error page
  +             */
  +            int status = r->status;
  +            r->status = HTTP_OK;
  +            return status;
  +        }
       } else 
           return OK;
   }
  
  
  

Mime
View raw message