Does the status of the HTTP status code matter

Let's say I'm sending some HTTP status code in PHP, do I really need to do

header('HTTP/1.1 301 Moved Permanently'); 

or enough for

 header('HTTP/1.1 301 FooBar'); 

I did this in a quick and dirty reverse proxy, where I could get the code, not the message, from the CURL response and sent it back with the FooBar message. This seems to work fine.

+7
source share
1 answer

Via spec :

Separate values โ€‹โ€‹of numerical status codes defined for HTTP / 1.1 and an approximate set of corresponding preconditioned phrases. presented below. The phrases given here are the reasons for the recommendation - they MAY be replaced by local equivalents without affecting the protocol.

+9
source

All Articles