3. Protocol Parameters
The version of an HTTP message is indicated by an HTTP-Version field in the first line of the message. If the protocol version is not specified, the recipient must assume that the message is in the simple HTTP/0.9 format.
HTTP-Version = "HTTP" "/" 1*DIGIT "." 1*DIGITNote that the major and minor numbers should be treated as separate integers and that each may be incremented higher than a single digit. Thus, HTTP/2.4 is a lower version than HTTP/2.13, which in turn is lower than HTTP/12.3. Leading zeroes should be ignored by recipients and never generated by senders.
This document defines both the 0.9 and 1.0 versions of the HTTP protocol. Applications sending Full-Request or Full-Response messages, as defined by this specification, must include an HTTP-Version of "HTTP/1.0
".
HTTP servers are required to be able to recognize the format of the Request-Line for all lower-version requests, understand requests with a format within one major number of their native version (i.e. <major1> and <major>), and respond appropriately with a message within the same <major> protocol number (even if the response is simply an error message). HTTP clients are required to be able to recognize the format of the Status-Line for all lower-version responses and understand responses with a format within one major number of their request version. The following hypothetical example illustrates the required behavior.
* Major number of 3: It should understand the request and respond in its native format;
* Major number of 4: It should understand the request and respond with a version 3 message;
* Major number higher than 4: It should attempt to understand the request and respond (possibly with an error) with a version 3 message;
* 2.0--3.4: It should understand the response and be aware that its request may not have been fully understood by the server;
* 3.5 or higher 3: It should understand the response and can assume that the server understood all aspects of the request if the response does not indicate an error;
* 4.0 or higher: It should attempt to understand the response and unobtrusively warn the user of the version mismatch.
Proxies must be careful in forwarding requests that are received in a format different than that of the proxy's native version. Since the protocol version indicates the protocol capability of the sender, a proxy must never send a message with a version indicator which is greater than its native version; if a higher version request is received, the proxy must either downgrade the request version or respond with an error. Requests with a version lower than that of the proxy's native format may be upgraded by the proxy before being forwarded; the proxy's response to that request must follow the normal server requirements.
Generated with CERN WebMaker