From: Sascha Schumann Date: Fri, 27 Oct 2000 10:19:06 +0000 (+0000) Subject: Use php_handle_auth_data X-Git-Tag: php-4.0.4RC3~505 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e6dd64e96ee818e1d76cce326aa80a3e4b310c2e;p=php Use php_handle_auth_data --- diff --git a/sapi/thttpd/thttpd.c b/sapi/thttpd/thttpd.c index 47eed6767f..13fbb8b6e9 100644 --- a/sapi/thttpd/thttpd.c +++ b/sapi/thttpd/thttpd.c @@ -241,22 +241,7 @@ static void thttpd_request_ctor(TLS_D SLS_DC) SG(request_info).auth_user = NULL; SG(request_info).auth_password = NULL; - if (TG(hc)->authorization[0] != '\0' - && strncmp(TG(hc)->authorization, "Basic ", 6) == 0) { - char *pass; - char *user; - - user = php_base64_decode(TG(hc)->authorization + 6, strlen(TG(hc)->authorization) - 6, NULL); - if (user) { - pass = strchr(user, ':'); - if (pass) { - *pass++ = '\0'; - SG(request_info).auth_user = user; - SG(request_info).auth_password = estrdup(pass); - } else - efree(user); - } - } + php_handle_auth_data(TG(hc)->authorization SLS_CC); TG(post_off) = TG(hc)->read_idx - TG(hc)->checked_idx;