I want to change http status header with my own status message. For example, change HTTP/1.1 200 OK
to HTTP/1.1 200 custom status message in utf-8
. To do it, I send some headers with php:
Content-Type: text/html; charset=UTF-8
HTTP/1.1 200 custom status message in utf-8
But in Chrome developer tools I see status message in wrong encoding, for example Status Code:200 УпÑ! ЧÑо-Ñо
. Is it possible to fix this?
HTTP messages are encoded with ISO-8859-1 (which can be nominally considered as an enhanced ASCII version, containing umlauts, diacritic and other characters of West European languages). At the same time, the message body can use another encoding assigned in "Content-Type" header.
The origin server MUST create the resource before returning the 201 status code. If the action cannot be carried out immediately, the server SHOULD respond with 202 (Accepted) response instead.
(a) the encoding is undefined, so it's not worth trying non-ASCII, furthermore, (b) the reason phrase does not exist anymore in in HTTP/2.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With