You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mi...@apache.org on 2002/09/26 10:55:29 UTC

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

minfrin     2002/09/26 01:55:29

  Modified:    .        CHANGES
               modules/proxy proxy_http.c
  Log:
  Make sure the contents of the WWW-Authenticate header is
  passed on a 4xx error by proxy. Previously all headers
  were dropped, resulting in the browser being unable to
  authenticate.
  Submitted by:	Dr Richard Reiner <rr...@fscinternet.com>, Richard Danielli <rd...@fscinternet.com>, Graham Wiseman <gw...@fscinternet.com>, David Henderson <dh...@fscinternet.com>
  Reviewed by:	Graham Leggett
  
  Revision  Changes    Path
  1.937     +8 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.936
  retrieving revision 1.937
  diff -u -r1.936 -r1.937
  --- CHANGES	25 Sep 2002 07:08:45 -0000	1.936
  +++ CHANGES	26 Sep 2002 08:55:28 -0000	1.937
  @@ -1,5 +1,13 @@
   Changes with Apache 2.0.43
   
  +  *) Make sure the contents of the WWW-Authenticate header is
  +     passed on a 4xx error by proxy. Previously all headers
  +     were dropped, resulting in the browser being unable to
  +     authenticate. [Dr Richard Reiner <rr...@fscinternet.com>,
  +     Richard Danielli <rd...@fscinternet.com>, Graham Wiseman
  +     <gw...@fscinternet.com>, David Henderson
  +     <dh...@fscinternet.com>]
  +
     *) Make mod_cache's CacheMaxStreamingBuffer directive work
        properly for virtual hosts that override server-wide mod_cache
        setttings.  [Matthieu Estrade <es...@ifrance.com>]
  
  
  
  1.161     +12 -0     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.160
  retrieving revision 1.161
  diff -u -r1.160 -r1.161
  --- proxy_http.c	22 Aug 2002 15:02:49 -0000	1.160
  +++ proxy_http.c	26 Sep 2002 08:55:28 -0000	1.161
  @@ -860,6 +860,17 @@
               }
           }
   
  +      if ((r->status == 401) && (conf->error_override != 0)) {
  +          const char *buf;
  +          const char *wa = "WWW-Authenticate";
  +          if (buf = apr_table_get(r->headers_out, wa)) {
  +              apr_table_set(r->err_headers_out, wa, buf);
  +          } else {
  +              ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
  +                           "proxy: origin server sent 401 without w-a header");
  +          }
  +      }
  +
           r->sent_bodyct = 1;
           /* Is it an HTTP/0.9 response? If so, send the extra data */
           if (backasswards) {
  @@ -966,6 +977,7 @@
                */
               int status = r->status;
               r->status = HTTP_OK;
  +          ap_discard_request_body(rp);
               return status;
           }
       } else