]> granicus.if.org Git - php/commitdiff
Leave initializing of auth_(user|password) to php_handle_auth_data().
authorSascha Schumann <sas@php.net>
Fri, 27 Oct 2000 10:31:10 +0000 (10:31 +0000)
committerSascha Schumann <sas@php.net>
Fri, 27 Oct 2000 10:31:10 +0000 (10:31 +0000)
sapi/apache2filter/sapi_apache2.c
sapi/cgi/cgi_main.c
sapi/thttpd/thttpd.c

index 6fe809d7b728e7fc9f9180bc99aa8389b19acac2..ff40efdb1f79d921e99f9e18b6e356948dfcf28d 100644 (file)
@@ -209,8 +209,7 @@ static int php_filter(ap_filter_t *f, ap_bucket_brigade *bb)
                apr_table_set(f->r->headers_in, "Connection", "close");
                apr_table_unset(f->r->headers_out, "Content-Length");
                auth = apr_table_get(f->r->headers_in, "Authorization");
-               if (auth)
-                       php_handle_auth_data(auth SLS_CC);
+               php_handle_auth_data(auth SLS_CC);
        }
 
        /* moves data from bb to ctx->bb */
index fd96320ae431143a9972a97cc25fb0fc98097ea6..513838042db6f01f9f8fb5dcf2081e578e72297f 100644 (file)
@@ -329,13 +329,8 @@ static void init_request_info(SLS_D)
        SG(sapi_headers).http_response_code = 200;
        
        /* The CGI RFC allows servers to pass on unvalidated Authorization data */
-       if ((auth = getenv("HTTP_AUTHORIZATION"))) {
-               php_handle_auth_data(auth SLS_CC);
-       } else {
-               SG(request_info).auth_user = NULL;
-               SG(request_info).auth_password = NULL;
-       }
-
+       auth = getenv("HTTP_AUTHORIZATION");
+       php_handle_auth_data(auth SLS_CC);
 }
 
 
index 13fbb8b6e948924b4dc929cee4d04fe8863723f1..b286cd80fae09881cf36a9d49e18d4b25ad1196c 100644 (file)
@@ -238,9 +238,6 @@ static void thttpd_request_ctor(TLS_D SLS_DC)
        SG(request_info).content_type = TG(hc)->contenttype;
        SG(request_info).content_length = TG(hc)->contentlength;
        
-       SG(request_info).auth_user = NULL;
-       SG(request_info).auth_password = NULL;
-
        php_handle_auth_data(TG(hc)->authorization SLS_CC);
 
        TG(post_off) = TG(hc)->read_idx - TG(hc)->checked_idx;