Connected: An Internet Encyclopedia
4.1 Message Types

Up: Connected: An Internet Encyclopedia
Up: Requests For Comments
Up: RFC 2068
Up: 4 HTTP Message
Prev: 4 HTTP Message
Next: 4.2 Message Headers

4.1 Message Types

4.1 Message Types

HTTP messages consist of requests from client to server and responses from server to client.

          HTTP-message   = Request | Response     ; HTTP/1.1 messages

Request (section 5) and Response (section 6) messages use the generic message format of RFC 822 [9] for transferring entities (the payload of the message). Both types of message consist of a start-line, one or more header fields (also known as "headers"), an empty line (i.e., a line with nothing preceding the CRLF) indicating the end of the header fields, and an optional message-body.

           generic-message = start-line
                             *message-header
                             CRLF
                             [ message-body ]

           start-line      = Request-Line | Status-Line

In the interest of robustness, servers SHOULD ignore any empty line(s) received where a Request-Line is expected. In other words, if the server is reading the protocol stream at the beginning of a message and receives a CRLF first, it should ignore the CRLF.


Next: 4.2 Message Headers

Connected: An Internet Encyclopedia
4.1 Message Types