tags:

views:

42

answers:

2

Is there any rule against sending an alternate text for an HTTP response error? For example, a default is HTTP/1.1 400 Bad Request. When sending a header I set myself is it legal to do something like HTTP/1.1 400 Epic Fail?

+1  A: 

That's perfectly legal. Clients should only care about the error code, although they may chose to render the status text to the user (most often, they render the body of the response instead).

Martin v. Löwis
+3  A: 

It's fine. You can put any text there. You can even use special characters as long as you stick to ISO-8859-1 encoding.

From the RFC:

The reason phrases listed here are only recommendations -- they MAY be replaced by local equivalents without affecting the protocol.

porneL