11.07.2015 Views

Network Working Group R. Fielding Request for Comments: 2616 ...

Network Working Group R. Fielding Request for Comments: 2616 ...

Network Working Group R. Fielding Request for Comments: 2616 ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

RFC <strong>2616</strong> HTTP/1.1 June 1999HTTP/1.1 has been designed to allow implementations of applicationsthat do not depend on knowledge of ranges.4 HTTP Message4.1 Message TypesHTTP messages consist of requests from client to server and responsesfrom server to client.HTTP-message = <strong>Request</strong> | Response; HTTP/1.1 messages<strong>Request</strong> (section 5) and Response (section 6) messages use the genericmessage <strong>for</strong>mat of RFC 822 [9] <strong>for</strong> transferring entities (the payloadof the message). Both types of message consist of a start-line, zeroor more header fields (also known as "headers"), an empty line (i.e.,a line with nothing preceding the CRLF) indicating the end of theheader fields, and possibly a message-body.generic-message = start-line*(message-header CRLF)CRLF[ message-body ]start-line = <strong>Request</strong>-Line | Status-LineIn the interest of robustness, servers SHOULD ignore any emptyline(s) received where a <strong>Request</strong>-Line is expected. In other words, ifthe server is reading the protocol stream at the beginning of amessage and receives a CRLF first, it should ignore the CRLF.Certain buggy HTTP/1.0 client implementations generate extra CRLF'safter a POST request. To restate what is explicitly <strong>for</strong>bidden by theBNF, an HTTP/1.1 client MUST NOT preface or follow a request with anextra CRLF.4.2 Message HeadersHTTP header fields, which include general-header (section 4.5),request-header (section 5.3), response-header (section 6.2), andentity-header (section 7.1) fields, follow the same generic <strong>for</strong>mat asthat given in Section 3.1 of RFC 822 [9]. Each header field consistsof a name followed by a colon (":") and the field value. Field namesare case-insensitive. The field value MAY be preceded by any amountof LWS, though a single SP is preferred. Header fields can beextended over multiple lines by preceding each extra line with atleast one SP or HT. Applications ought to follow "common <strong>for</strong>m", whereone is known or indicated, when generating HTTP constructs, since

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!