You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Marc Slemko <ma...@znep.com> on 1997/10/05 19:51:12 UTC

[PATCH] lets make proxy-authentication really work

Testing against r->status before it is set to anything useful doesn't make
much sense.

The other option would be to test against type, but I think that this
check comes better after r->status is set.  Either way.

Index: main/http_request.c
===================================================================
RCS file: /export/home/cvs/apachen/src/main/http_request.c,v
retrieving revision 1.86
diff -u -r1.86 http_request.c
--- http_request.c	1997/10/05 02:04:44	1.86
+++ http_request.c	1997/10/05 17:44:50
@@ -850,15 +850,6 @@
     char *custom_response = response_code_string(r, error_index);
     int recursive_error = 0;
 
-    /*
-     * This test is done here so that none of the auth modules needs to know
-     * about proxy authentication.  They treat it like normal auth, and then
-     * we tweak the status.
-     */
-    if (r->status == AUTH_REQUIRED && r->proxyreq) {
-        r->status = HTTP_PROXY_AUTHENTICATION_REQUIRED;
-    }
-
     if (type == DONE) {
         finalize_request_protocol(r);
         return;
@@ -882,6 +873,15 @@
     }
 
     r->status = type;
+
+    /*
+     * This test is done here so that none of the auth modules needs to know
+     * about proxy authentication.  They treat it like normal auth, and then
+     * we tweak the status.
+     */
+    if (r->status == AUTH_REQUIRED && r->proxyreq) {
+        r->status = HTTP_PROXY_AUTHENTICATION_REQUIRED;
+    }
 
     /*
      * Two types of custom redirects --- plain text, and URLs. Plain text has


Re: [PATCH] lets make proxy-authentication really work

Posted by Dean Gaudet <dg...@arctic.org>.
+1

On Sun, 5 Oct 1997, Marc Slemko wrote:

> Testing against r->status before it is set to anything useful doesn't make
> much sense.
> 
> The other option would be to test against type, but I think that this
> check comes better after r->status is set.  Either way.
> 
> Index: main/http_request.c
> ===================================================================
> RCS file: /export/home/cvs/apachen/src/main/http_request.c,v
> retrieving revision 1.86
> diff -u -r1.86 http_request.c
> --- http_request.c	1997/10/05 02:04:44	1.86
> +++ http_request.c	1997/10/05 17:44:50
> @@ -850,15 +850,6 @@
>      char *custom_response = response_code_string(r, error_index);
>      int recursive_error = 0;
>  
> -    /*
> -     * This test is done here so that none of the auth modules needs to know
> -     * about proxy authentication.  They treat it like normal auth, and then
> -     * we tweak the status.
> -     */
> -    if (r->status == AUTH_REQUIRED && r->proxyreq) {
> -        r->status = HTTP_PROXY_AUTHENTICATION_REQUIRED;
> -    }
> -
>      if (type == DONE) {
>          finalize_request_protocol(r);
>          return;
> @@ -882,6 +873,15 @@
>      }
>  
>      r->status = type;
> +
> +    /*
> +     * This test is done here so that none of the auth modules needs to know
> +     * about proxy authentication.  They treat it like normal auth, and then
> +     * we tweak the status.
> +     */
> +    if (r->status == AUTH_REQUIRED && r->proxyreq) {
> +        r->status = HTTP_PROXY_AUTHENTICATION_REQUIRED;
> +    }
>  
>      /*
>       * Two types of custom redirects --- plain text, and URLs. Plain text has
> 
>