- From: Martin Thomson <martin.thomson@gmail.com>
- Date: Sun, 20 Jul 2014 11:55:01 -0700
- To: Kari Hurtta <hurtta-ietf@elmme-mailer.org>
- Cc: HTTP Working Group <ietf-http-wg@w3.org>
- Message-ID: <CABkgnnWJmJL0zVN_8sD+9Bda7rBKFe5=YP7Hxfdv5qLoKdxkUw@mail.gmail.com>
Good catch. #564... On Jul 20, 2014 6:11 AM, "Kari Hurtta" <hurtta-ietf@elmme-mailer.org> wrote: > > Hypertext Transfer Protocol version 2 > draft-ietf-httpbis-http2-latest > July 16, 2014 > http://http2.github.io/http2-spec/ > > 2. HTTP/2 Protocol Overview > http://http2.github.io/http2-spec/#Overview > > » HTTP/2 provides an optimized transport for HTTP semantics. HTTP/2 > » supports all of the core features of HTTP/1.1, but aims to be more > » efficient in several ways. > > 8.1.2.5 Malformed Requests and Responses > http://http2.github.io/http2-spec/#rfc.section.8.1.2.5 > > » A request or response that includes an entity body can include a > » content-length header field. A request or response is also malformed > » if the value of a content-length header field does not equal the sum > » of the DATA frame payload lengths that form the body. > > RFC 7230: Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and > Routing > https://tools.ietf.org/html/rfc7230 > > 3.3. Message Body > https://tools.ietf.org/html/rfc7230#section-3.3 > > » (Section 3.1.2). Responses to the HEAD request method (Section 4.3.2 > » of [RFC7231]) never include a message body because the associated > » response header fields (e.g., Transfer-Encoding, Content-Length, > » etc.), if present, indicate only what their values would have been if > » the request method had been GET (Section 4.3.1 of [RFC7231]). 2xx > > 3.3.2. Content-Length > https://tools.ietf.org/html/rfc7230#section-3.3.2 > > » A server MAY send a Content-Length header field in a response to a > » HEAD request (Section 4.3.2 of [RFC7231]); a server MUST NOT send > » Content-Length in such a response unless its field-value equals the > » decimal number of octets that would have been sent in the payload > » body of a response if the same request had used the GET method. > > > Note conflict between Hypertext Transfer Protocol version 2 > and RFC 7230. > > On response of HEAD request there is (or may be) Content-Length header > field. There is no body. > > Hypertext Transfer Protocol version 2 says that response > is malformed when Content-Length header field value is > not equal the sum of the DATA frame payload lengths that > form the body. > > > However sum of the DATA frame payload lengths that form the body > is 0 (zero) on HEAD response, because body is not allowed. And > Content-Length header field value must be equal of correspond > value of GET request. > > / Kari Hurtta >
Received on Sunday, 20 July 2014 18:55:28 UTC