You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ia...@apache.org on 2001/11/06 00:06:55 UTC

cvs commit: httpd-2.0/modules/proxy proxy_http.c

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 <ji...@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;
   }