]> granicus.if.org Git - php/commitdiff
When using HTTP auth from PHP, fill in the %u custom log field so the
authorRasmus Lerdorf <rasmus@php.net>
Wed, 5 Jul 2000 18:02:42 +0000 (18:02 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Wed, 5 Jul 2000 18:02:42 +0000 (18:02 +0000)
authenticated used id will get logged in the Apache access_log
@- When using HTTP auth from PHP, fill in the %u custom log field so the
@  authenticated used id will get logged in the Apache access_log (Rasmus)

sapi/apache/mod_php4.c

index eb21b675c7578f281337d7a19c5c2ce83012ae8c..774769eb04b1c5d3b27367d7bc7b6b94f6d5b2c8 100644 (file)
@@ -399,6 +399,8 @@ static void init_request_info(SLS_D)
                tmp = uudecode(r->pool, authorization);
                SG(request_info).auth_user = getword_nulls_nc(r->pool, &tmp, ':');
                if (SG(request_info).auth_user) {
+                       r->connection->user = pstrdup(r->connection->pool,SG(request_info).auth_user);
+                       r->connection->ap_auth_type = "Basic";
                        SG(request_info).auth_user = estrdup(SG(request_info).auth_user);
                }
                SG(request_info).auth_password = tmp;