From: Sascha Schumann Date: Fri, 27 Oct 2000 10:31:10 +0000 (+0000) Subject: Leave initializing of auth_(user|password) to php_handle_auth_data(). X-Git-Tag: php-4.0.4RC3~500 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6ff371d9f78bca80dde59d9484352ddfc3b3f490;p=php Leave initializing of auth_(user|password) to php_handle_auth_data(). --- diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c index 6fe809d7b7..ff40efdb1f 100644 --- a/sapi/apache2filter/sapi_apache2.c +++ b/sapi/apache2filter/sapi_apache2.c @@ -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 */ diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index fd96320ae4..513838042d 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -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); } diff --git a/sapi/thttpd/thttpd.c b/sapi/thttpd/thttpd.c index 13fbb8b6e9..b286cd80fa 100644 --- a/sapi/thttpd/thttpd.c +++ b/sapi/thttpd/thttpd.c @@ -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;