dmitry Tue Jun 26 14:47:16 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src NEWS
/php-src/sapi/cgi cgi_main.c
Log:
Fixed bug #40419 (Trailing Slash in CGI request don't work)
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.802&r2=1.2027.2.547.2.803&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.802 php-src/NEWS:1.2027.2.547.2.803
--- php-src/NEWS:1.2027.2.547.2.802 Tue Jun 26 12:10:08 2007
+++ php-src/NEWS Tue Jun 26 14:47:15 2007
@@ -88,6 +88,7 @@
integer as sections). (Tony)
- Fixed bug #41350 (my_thread_global_end() error during request shutdown
on Windows). (Scott, Andrey)
+- Fixed bug #40419 (Trailing Slash in CGI request don't work). (Dmitry)
- Fixed bug #39330 (apache2handler does not call shutdown actions before
apache child die). (isk at ecommerce dot com, Gopal, Tony)
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.42&r2=1.267.2.15.2.43&diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.42
php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.43
--- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.42 Thu Jun 21 08:40:43 2007
+++ php-src/sapi/cgi/cgi_main.c Tue Jun 26 14:47:16 2007
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: cgi_main.c,v 1.267.2.15.2.42 2007/06/21 08:40:43 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.267.2.15.2.43 2007/06/26 14:47:16 dmitry Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -766,7 +766,7 @@
char *env_document_root = sapi_cgibin_getenv("DOCUMENT_ROOT",
sizeof("DOCUMENT_ROOT")-1 TSRMLS_CC);
if (CGIG(fix_pathinfo)) {
- char *real_path;
+ char *real_path = NULL;
char *orig_path_translated = env_path_translated;
char *orig_path_info = env_path_info;
char *orig_script_name = env_script_name;
@@ -926,6 +926,9 @@
efree(pt);
}
} else {
+ if (real_path) {
+ script_path_translated = real_path;
+ }
/* make sure path_info/translated are empty */
if (!orig_script_filename ||
(script_path_translated !=
orig_script_filename) ||
@@ -951,8 +954,10 @@
} else {
SG(request_info).request_uri =
env_script_name;
}
+ if (real_path) {
+ free(real_path);
+ }
}
- free(real_path);
} else {
#endif
/* pre 4.3 behaviour, shouldn't be used but provides BC
*/
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php