CVS update: php31/sapi

From: Date: Thu, 27 Aug 1998 04:28:43 +0000
Subject: CVS update: php31/sapi
Groups: php.dev 
Request: Send a blank email to php-dev+get-598@lists.php.net to get a copy of this message
Date: Thursday August 27, 1998 @ 0:28 Author: rasmus Update of /repository/php31/sapi In directory asf:/export/home/rasmus/php31/sapi Modified Files: cgi_sapi.c Log Message: FORCE_CGI_REDIRECT $PHP_SELF patch for 3.1 tree Index: php31/sapi/cgi_sapi.c diff -c php31/sapi/cgi_sapi.c:2.16 php31/sapi/cgi_sapi.c:2.17 *** php31/sapi/cgi_sapi.c:2.16 Sun Aug 23 02:29:14 1998 --- php31/sapi/cgi_sapi.c Thu Aug 27 00:28:43 1998 *************** *** 156,164 **** { pval tmp; /* Build the special-case PHP_SELF variable for the CGI version */ - char *sn, *pi; - int l = 0; SAPI_FUNC_VARS; sn = sapi_info->script_name; pi = sapi_info->path_info; --- 156,170 ---- { pval tmp; /* Build the special-case PHP_SELF variable for the CGI version */ SAPI_FUNC_VARS; + char *pi; + #if FORCE_CGI_REDIRECT + pi = GLOBAL(request_info).path_info; + tmp.value.str.val = emalloc(((pi)?strlen(pi):0) + 1); + tmp.value.str.len = _php3_sprintf(tmp.value.str.val, "%s", (pi ? pi : "")); /* SAFE */ + #else + char *sn; + int l = 0; sn = sapi_info->script_name; pi = sapi_info->path_info; *************** *** 174,179 **** --- 180,186 ---- } tmp.value.str.val = emalloc(l + 1); tmp.value.str.len = _php3_sprintf(tmp.value.str.val, "%s%s", (sn ? sn : ""), (pi ? pi : "")); /* SAFE */ + #endif tmp.type = IS_STRING; #ifdef THREAD_SAFE _php3_hash_update(&php3_globals->symbol_table, "PHP_SELF", sizeof("PHP_SELF"), (void *) & tmp, sizeof(pval), NULL); -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#598) next »