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

Make SERVER_SOFTWARE compliant with RFC3875 (#11093)

This commit is contained in:
Cédric Anne
2023-05-05 13:43:34 +02:00
committed by GitHub
parent 2e0f75ec14
commit c02348cf9d
3 changed files with 5 additions and 2 deletions

View File

@@ -68,6 +68,9 @@ PHP 8.3 UPGRADE NOTES
3. Changes in SAPI modules
========================================
- $_SERVER['SERVER_SOFTWARE'] value from the built-in CLI server changed
to make it compliant with RFC3875.
========================================
4. Deprecated Functionality
========================================

View File

@@ -696,7 +696,7 @@ static void sapi_cli_server_register_variables(zval *track_vars_array) /* {{{ */
}
}
{
zend_string *tmp = strpprintf(0, "PHP %s Development Server", PHP_VERSION);
zend_string *tmp = strpprintf(0, "PHP/%s (Development Server)", PHP_VERSION);
sapi_cli_server_register_known_var_str(track_vars_array, "SERVER_SOFTWARE", strlen("SERVER_SOFTWARE"), tmp);
zend_string_release_ex(tmp, /* persistent */ false);
}

View File

@@ -14,7 +14,7 @@ var_dump(file_get_contents("http://" . PHP_CLI_SERVER_ADDRESS));
?>
--EXPECTF--
string(%d) "string(%d) "%sphp_cli_server_002"
string(%d) "PHP %s Development Server"
string(%d) "PHP/%s (Development Server)"
string(%d) "localhost"
string(%d) "%s"
"