3.2.5.1 Receiving an HTTP Request

When an HTTP Request message is received, the HTTP server MUST validate it and process it as specified in [RFC2616], except as follows.

If the Request-URI contains a query component that does not conform to the standard syntax, but does conform to the extended syntax specified in section 2.2.1, the server MUST interpret it as being encoded in the server's CodePage (see [MS-UCODEREF] section 3.1.5.1.1.3 for details). If the Request-URI contains a query component containing a percent (%) character, the server SHOULD interpret it as being escaped as specified in [RFC2396] section 2.4.1. The server MAY<4> instead interpret it literally; that is, where the percent character represents itself rather than indicating the beginning of an escape sequence.

The Host header MUST be validated using the extended syntax specified in section 2.2.2. If the value contains characters that would not be valid in the standard syntax, the server SHOULD interpret it as follows: attempt to interpret it as UTF-8 and if it is not a valid UTF-8 sequence, then interpret it in as being encoded in the server's CodePage (see [MS-UCODEREF] section 3.1.5.1.1.3 for details). The server MAY<5> instead reverse the order of checks; that is, first attempt to interpret it as being encoded in the server's CodePage and if it is not a valid string in that CodePage, then interpret it as being encoded in UTF-8.