1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.4'

This commit is contained in:
Jakub Zelenka
2025-02-08 12:08:19 +01:00
3 changed files with 9 additions and 7 deletions

View File

@@ -1151,6 +1151,7 @@ static void init_request_info(void)
}
if (tflag) {
char *decoded_path_info = NULL;
if (orig_path_info) {
char old;
@@ -1172,7 +1173,6 @@ static void init_request_info(void)
* As we can extract PATH_INFO from PATH_TRANSLATED
* it is probably also in SCRIPT_NAME and need to be removed
*/
char *decoded_path_info = NULL;
size_t decoded_path_info_len = 0;
if (strchr(path_info, '%')) {
decoded_path_info = estrdup(path_info);
@@ -1195,11 +1195,13 @@ static void init_request_info(void)
env_script_name[env_script_file_info_start] = 0;
SG(request_info).request_uri = FCGI_PUTENV(request, "SCRIPT_NAME", env_script_name);
}
if (decoded_path_info) {
efree(decoded_path_info);
}
}
env_path_info = FCGI_PUTENV(request, "PATH_INFO", path_info);
if (decoded_path_info) {
env_path_info = FCGI_PUTENV(request, "PATH_INFO", decoded_path_info);
efree(decoded_path_info);
} else {
env_path_info = FCGI_PUTENV(request, "PATH_INFO", path_info);
}
}
if (!orig_script_filename ||
strcmp(orig_script_filename, pt) != 0) {

View File

@@ -39,7 +39,7 @@ $tester
scriptFilename: "proxy:fcgi://" . $tester->getAddr() . $sourceFilePath . '/1%20+2',
scriptName: $scriptName . '/1 +2'
)
->expectBody([$scriptName, $scriptName . '/1 +2', $sourceFilePath, '/1%20+2', $scriptName . '/1%20+2']);
->expectBody([$scriptName, $scriptName . '/1 +2', $sourceFilePath, '/1 +2', $scriptName . '/1 +2']);
$tester->terminate();
$tester->close();

View File

@@ -39,7 +39,7 @@ $tester
scriptFilename: "proxy:fcgi://" . $tester->getAddr() . $sourceFilePath . '/1%202',
scriptName: $scriptName . '/1 2'
)
->expectBody([$scriptName, $scriptName . '/1 2', $sourceFilePath, '/1%202', $scriptName . '/1%202']);
->expectBody([$scriptName, $scriptName . '/1 2', $sourceFilePath, '/1 2', $scriptName . '/1 2']);
$tester->terminate();
$tester->close();