diff options
Diffstat (limited to 'sapi/apache2handler/sapi_apache2.c')
-rw-r--r-- | sapi/apache2handler/sapi_apache2.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c index 5fa6cdf75..c7733b443 100644 --- a/sapi/apache2handler/sapi_apache2.c +++ b/sapi/apache2handler/sapi_apache2.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2008 The PHP Group | + | Copyright (c) 1997-2009 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sapi_apache2.c,v 1.57.2.10.2.17 2008/01/16 15:50:37 iliaa Exp $ */ +/* $Id: sapi_apache2.c,v 1.57.2.10.2.19 2008/12/31 11:17:48 sebastian Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -456,6 +456,9 @@ static int php_apache_request_ctor(request_rec *r, php_struct *ctx TSRMLS_DC) if (!PG(safe_mode) || (PG(safe_mode) && !ap_auth_type(r))) { auth = apr_table_get(r->headers_in, "Authorization"); php_handle_auth_data(auth TSRMLS_CC); + if (SG(request_info).auth_user == NULL && r->user) { + SG(request_info).auth_user = estrdup(r->user); + } ctx->r->user = apr_pstrdup(ctx->r->pool, SG(request_info).auth_user); } else { SG(request_info).auth_user = NULL; |