diff options
| author | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:34:59 -0400 |
|---|---|---|
| committer | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:34:59 -0400 |
| commit | ce7edc9b3c7370f32fec0bc7a8ec3e29ed9a5f61 (patch) | |
| tree | acdb9a8816483652a9db1a47db71df5df43707c5 /sapi/apache_hooks | |
| parent | 10f5b47dc7c1cf2b9a00991629f43652710322d3 (diff) | |
| download | php-ce7edc9b3c7370f32fec0bc7a8ec3e29ed9a5f61.tar.gz | |
Imported Upstream version 5.1.1upstream/5.1.1
Diffstat (limited to 'sapi/apache_hooks')
| -rw-r--r-- | sapi/apache_hooks/config.m4 | 8 | ||||
| -rw-r--r-- | sapi/apache_hooks/mod_php5.c | 44 | ||||
| -rw-r--r-- | sapi/apache_hooks/mod_php5.h | 4 | ||||
| -rw-r--r-- | sapi/apache_hooks/php_apache.c | 4 | ||||
| -rw-r--r-- | sapi/apache_hooks/sapi_apache.c | 7 |
5 files changed, 35 insertions, 32 deletions
diff --git a/sapi/apache_hooks/config.m4 b/sapi/apache_hooks/config.m4 index 52402ca6e..6c9d028e8 100644 --- a/sapi/apache_hooks/config.m4 +++ b/sapi/apache_hooks/config.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.5.2.1 2005/03/04 15:15:49 sniper Exp $ +dnl $Id: config.m4,v 1.7 2005/05/29 23:16:46 sniper Exp $ dnl AC_DEFUN([PHP_APACHE_FD_CHECK], [ AC_CACHE_CHECK([for member fd in BUFF *],ac_cv_php_fd_in_buff,[ @@ -22,7 +22,7 @@ AC_MSG_CHECKING(for Apache 1.x (hooks) module support via DSO through APXS) AC_ARG_WITH(apache-hooks, [ --with-apache-hooks[=FILE] EXPERIMENTAL: Build shared Apache 1.x module. FILE is the optional - pathname to the Apache apxs tool; defaults to "apxs".],[ + pathname to the Apache apxs tool [apxs]],[ if test "$withval" = "yes"; then APXS=apxs $APXS -q CFLAGS >/dev/null 2>&1 @@ -123,7 +123,7 @@ AC_MSG_CHECKING(for Apache 1.x (hooks) module support) AC_ARG_WITH(apache-hooks-static, [ --with-apache-hooks-static[=DIR] EXPERIMENTAL: Build Apache 1.x module. DIR is the top-level Apache - build directory, defaults to /usr/local/apache.],[ + build directory [/usr/local/apache]],[ APACHE_INSTALL_FILES="\$(srcdir)/sapi/apache_hooks/mod_php5.* sapi/apache_hooks/libphp5.module" @@ -240,7 +240,7 @@ fi AC_MSG_CHECKING(for mod_charset compatibility option) AC_ARG_WITH(mod_charset, -[ --with-mod_charset Enable transfer tables for mod_charset (Rus Apache).], +[ --with-mod_charset Enable transfer tables for mod_charset (Rus Apache)], [ AC_MSG_RESULT(yes) AC_DEFINE(USE_TRANSFER_TABLES,1,[ ]) diff --git a/sapi/apache_hooks/mod_php5.c b/sapi/apache_hooks/mod_php5.c index 0635e1c05..6d4adb59b 100644 --- a/sapi/apache_hooks/mod_php5.c +++ b/sapi/apache_hooks/mod_php5.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2004 The PHP Group | + | Copyright (c) 1997-2005 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | PHP 4.0 patches by Zeev Suraski <zeev@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: mod_php5.c,v 1.4.2.2 2005/06/20 12:46:52 tony2001 Exp $ */ +/* $Id: mod_php5.c,v 1.11 2005/08/03 14:08:48 sniper Exp $ */ #include "php_apache_http.h" @@ -380,7 +380,7 @@ static void sapi_apache_register_server_variables(zval *track_vars_array TSRMLS_ if (elts[i].val) { val = elts[i].val; } else { - val = empty_string; + val = ""; } php_register_variable(elts[i].key, val, track_vars_array TSRMLS_CC); } @@ -527,6 +527,7 @@ static sapi_module_struct apache_sapi_module = { sapi_apache_register_server_variables, /* register server variables */ php_apache_log_message, /* Log message */ + NULL, /* Get request time */ NULL, /* php.ini path override */ @@ -568,6 +569,7 @@ static void init_request_info(TSRMLS_D) SG(request_info).path_translated = r->filename; SG(request_info).request_uri = r->uri; SG(request_info).request_method = (char *)r->method; + SG(request_info).proto_num = r->proto_num; SG(request_info).content_type = (char *) table_get(r->subprocess_env, "CONTENT_TYPE"); SG(request_info).content_length = (content_length ? atoi(content_length) : 0); SG(sapi_headers).http_response_code = r->status; @@ -575,24 +577,26 @@ static void init_request_info(TSRMLS_D) if (r->headers_in) { authorization = table_get(r->headers_in, "Authorization"); } - if (authorization - && !auth_type(r) - && !strcasecmp(getword(r->pool, &authorization, ' '), "Basic")) { - tmp = uudecode(r->pool, authorization); - SG(request_info).auth_user = NULL; - tmp_user = getword_nulls_nc(r->pool, &tmp, ':'); - if (tmp_user) { - r->connection->user = pstrdup(r->connection->pool, tmp_user); - r->connection->ap_auth_type = "Basic"; - SG(request_info).auth_user = estrdup(tmp_user); - } - SG(request_info).auth_password = NULL; - if (tmp) { - SG(request_info).auth_password = estrdup(tmp); + + SG(request_info).auth_user = NULL; + SG(request_info).auth_password = NULL; + + if (authorization && !auth_type(r)) { + if (!strcasecmp(getword(r->pool, &authorization, ' '), "Basic")) { + tmp = uudecode(r->pool, authorization); + tmp_user = getword_nulls_nc(r->pool, &tmp, ':'); + if (tmp_user) { + r->connection->user = pstrdup(r->connection->pool, tmp_user); + r->connection->ap_auth_type = "Basic"; + SG(request_info).auth_user = estrdup(tmp_user); + } + if (tmp) { + SG(request_info).auth_password = estrdup(tmp); + } + } else if (!strcasecmp(getword(r->pool, &authorization, ' '), "Digest")) { + r->connection->ap_auth_type = "Digest"; + SG(request_info).auth_digest = estrdup(authorization); } - } else { - SG(request_info).auth_user = NULL; - SG(request_info).auth_password = NULL; } } /* }}} */ diff --git a/sapi/apache_hooks/mod_php5.h b/sapi/apache_hooks/mod_php5.h index 89dfa25c3..536768497 100644 --- a/sapi/apache_hooks/mod_php5.h +++ b/sapi/apache_hooks/mod_php5.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2004 The PHP Group | + | Copyright (c) 1997-2005 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -15,7 +15,7 @@ | Author: Rasmus Lerdorf <rasmus@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: mod_php5.h,v 1.1 2004/01/17 13:00:09 sniper Exp $ */ +/* $Id: mod_php5.h,v 1.2 2005/08/03 14:08:49 sniper Exp $ */ #ifndef MOD_PHP5_H #define MOD_PHP5_H diff --git a/sapi/apache_hooks/php_apache.c b/sapi/apache_hooks/php_apache.c index 4d2677f2a..15bea4351 100644 --- a/sapi/apache_hooks/php_apache.c +++ b/sapi/apache_hooks/php_apache.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2004 The PHP Group | + | Copyright (c) 1997-2005 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | David Sklar <sklar@student.net> | +----------------------------------------------------------------------+ */ -/* $Id: php_apache.c,v 1.17.2.1 2005/01/14 20:45:11 sniper Exp $ */ +/* $Id: php_apache.c,v 1.19 2005/08/03 14:08:49 sniper Exp $ */ #include "php_apache_http.h" diff --git a/sapi/apache_hooks/sapi_apache.c b/sapi/apache_hooks/sapi_apache.c index 7bc28b585..29e1778ae 100644 --- a/sapi/apache_hooks/sapi_apache.c +++ b/sapi/apache_hooks/sapi_apache.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2004 The PHP Group | + | Copyright (c) 1997-2005 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -19,7 +19,7 @@ | Stig Bakken <ssb@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: sapi_apache.c,v 1.7 2004/01/08 08:18:06 andi Exp $ */ +/* $Id: sapi_apache.c,v 1.9 2005/08/03 14:08:49 sniper Exp $ */ #include "php_apache_http.h" @@ -33,8 +33,7 @@ int apache_php_module_main(request_rec *r, int display_source_mode TSRMLS_DC) return FAILURE; } /* sending a file handle to another dll is not working - // so let zend open it. - */ + so let zend open it. */ if (display_source_mode) { zend_syntax_highlighter_ini syntax_highlighter_ini; |
