You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
contents of $http_response_header is incorrect with long http message #9316
Array
(
[0] => HTTP/1.1 403 Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly includ
[1] => ing the signature.
[2] => Content-Length: 544
[3] => Content-Type: application/xml
[4] => Server: Microsoft-HTTPAPI/2.0
[5] => x-ms-request-id: 62435059-d01e-0017-2c51-aea046000000
[6] => x-ms-error-code: AuthenticationFailed
[7] => Date: Fri, 12 Aug 2022 13:45:53 GMT
[8] => Connection: close
)
But I expected this output instead:
Array
(
[0] => HTTP/1.1 403 Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
[1] => Content-Length: 544
[2] => Content-Type: application/xml
[3] => Server: Microsoft-HTTPAPI/2.0
[4] => x-ms-request-id: 62435059-d01e-0017-2c51-aea046000000
[5] => x-ms-error-code: AuthenticationFailed
[6] => Date: Fri, 12 Aug 2022 13:45:53 GMT
[7] => Connection: close
)
Here are the raw response headers according to network tab of FireFox:
HTTP/1.1 403 Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
Content-Length: 544
Content-Type: application/xml
Server: Microsoft-HTTPAPI/2.0
x-ms-request-id: d9fdcb88-f01e-0022-4551-ae0e13000000
x-ms-error-code: AuthenticationFailed
Date: Fri, 12 Aug 2022 13:42:57 GMT
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.
Activity
damianwadley commentedon Aug 12, 2022
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.
cmb69 commentedon Aug 12, 2022
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.
Fix phpGH-9316: $http_response_header is wrong for long status line
Fix GH-9316: $http_response_header is wrong for long status line
Merge branch 'PHP-8.0' into PHP-8.1
Merge branch 'PHP-8.1'
ext/standard: Fix GH-9316
Merge branch 'PHP-8.3'