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:
@@ -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
|
||||
========================================
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user