Browse Source

Fixed bug #40419 (Trailing Slash in CGI request don't work)

experimental/5.2-WITH_DRCP
Dmitry Stogov 19 years ago
parent
commit
e5909f149c
  1. 1
      NEWS
  2. 9
      sapi/cgi/cgi_main.c

1
NEWS

@ -88,6 +88,7 @@ PHP NEWS
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)

9
sapi/cgi/cgi_main.c

@ -766,7 +766,7 @@ static void init_request_info(TSRMLS_D)
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 @@ static void init_request_info(TSRMLS_D)
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 @@ static void init_request_info(TSRMLS_D)
} 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 */

Loading…
Cancel
Save