I was beginning to like HTTP, until I discovered that some status codes like 304, contain no message body and are terminated by CRLF.
Where’s a comprehensive list? So far I got: 100-199, 204, and 304. Are there any others?
EDIT: No, there are no others, according to the standard. Thanks for the answer.
I am concerned with message delimiting with persistent connections. i.e. where does one HTTP message stop and the next begin.
A body is optional for all the
4xxerror codes:Same for the
5xx:(SHOULD means that really, they should, but it’s not a MUST.)
The
1xxmessages don’t contain a body as far as I can tell.201(in addition to204and205) doesn’t have to have a body. The3xxare a mixed bag, but a body is optional for a lot of them.Source: HTTP/1.1: Status Code definitions.
The rules for message length information are described in HTTP Message – 4.4 Message Length. It’s not exactly trivial.