-
Notifications
You must be signed in to change notification settings - Fork 7.8k
contents of $http_response_header is incorrect with long http message #9316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
Allowing more than 127 characters, like 255 is a nice round number, seems reasonable, but that status line is only supposed to have a short descriptive reason for the code. It is not the place for error messages. So tsk tsk, Microsoft. |
I have to agree that the reason-phrase is unnecessarily verbose, but to my knowledge there is no actual length restriction, so we should probably comply. |
cmb69
added a commit
to cmb69/php-src
that referenced
this issue
Aug 12, 2022
While the reason-phrase in a HTTP response status line is usually short, there is no actual limit specified by the RFCs. As such, we must not assume that the line fits into the buffer (which is currently 128 bytes large). Since there is no real need to present the complete status line, we simply read and discard the rest of a long line.
cmb69
added a commit
to cmb69/php-src
that referenced
this issue
Aug 17, 2022
While the reason-phrase in a HTTP response status line is usually short, there is no actual limit specified by the RFCs. As such, we must not assume that the line fits into the buffer (which is currently 128 bytes large). Since there is no real need to present the complete status line, we simply read and discard the rest of a long line.
cmb69
added a commit
that referenced
this issue
Aug 18, 2022
* PHP-8.0: Fix GH-9316: $http_response_header is wrong for long status line
cmb69
added a commit
that referenced
this issue
Aug 18, 2022
* PHP-8.1: Fix GH-9316: $http_response_header is wrong for long status line
Girgias
added a commit
that referenced
this issue
Nov 22, 2023
http_build_query() default null argument for is implicitly coerced to string Closes GH-9316
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The following code:
Resulted in this output:
But I expected this output instead:
Here are the raw response headers according to network tab of FireFox:
PHP Version
PHP 8.1
Operating System
No response
The text was updated successfully, but these errors were encountered: