cvs: php4 /sapi/isapi php4isapi.c

From: Date: Tue, 27 Feb 2001 13:29:22 +0000
Subject: cvs: php4 /sapi/isapi php4isapi.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-4289@lists.php.net to get a copy of this message
joosters Tue Feb 27 05:29:22 2001 EDT Modified files: /php4/sapi/isapi php4isapi.c Log: Added PHP_AUTH_USER, PHP_AUTH_PW and PHP_AUTH_TYPE environment variables for Zeus/ISAPI, so basic authenication works. Submitted by: daniel@zeus.com Index: php4/sapi/isapi/php4isapi.c diff -u php4/sapi/isapi/php4isapi.c:1.67 php4/sapi/isapi/php4isapi.c:1.68 --- php4/sapi/isapi/php4isapi.c:1.67 Sun Feb 25 22:07:36 2001 +++ php4/sapi/isapi/php4isapi.c Tue Feb 27 05:29:21 2001 @@ -383,6 +383,20 @@ static_variable_buf[ variable_len - pathinfo_len - 1 ] = '\0'; php_register_variable( "PATH_TRANSLATED", static_variable_buf, track_vars_array ELS_CC PLS_CC ); } + + /* Bring in the AUTHENTICATION stuff as needed */ + variable_len = ISAPI_SERVER_VAR_BUF_SIZE; + if ( lpECB->GetServerVariable(lpECB->ConnID, "AUTH_USER", static_variable_buf, &variable_len) && static_variable_buf[0] ) { + php_register_variable( "PHP_AUTH_USER", static_variable_buf, track_vars_array ELS_CC PLS_CC ); + } + variable_len = ISAPI_SERVER_VAR_BUF_SIZE; + if ( lpECB->GetServerVariable(lpECB->ConnID, "AUTH_PASSWORD", static_variable_buf, &variable_len) && static_variable_buf[0] ) { + php_register_variable( "PHP_AUTH_PW", static_variable_buf, track_vars_array ELS_CC PLS_CC ); + } + variable_len = ISAPI_SERVER_VAR_BUF_SIZE; + if ( lpECB->GetServerVariable(lpECB->ConnID, "AUTH_TYPE", static_variable_buf, &variable_len) && static_variable_buf[0] ) { + php_register_variable( "PHP_AUTH_TYPE", static_variable_buf, track_vars_array ELS_CC PLS_CC ); + } } #endif

« previous php.cvs (#4289) next »