Re: draft-ietf-httpbis-http2-latest, 8.1.2.5 Malformed Requests and Responses, response of HEAD request

Martin Thomson <martin.thomson@gmail.com> Sun, 20 July 2014 18:59 UTC

Return-Path: <ietf-http-wg-request@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DE2561B2CB4 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 20 Jul 2014 11:59:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.002
X-Spam-Level:
X-Spam-Status: No, score=-6.002 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, GB_SUMOF=1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TMN4eTmwIqd2 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 20 Jul 2014 11:59:20 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 924F71B2CA7 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sun, 20 Jul 2014 11:59:20 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1X8wGq-0005Ml-6h for ietf-http-wg-dist@listhub.w3.org; Sun, 20 Jul 2014 18:55:40 +0000
Resent-Date: Sun, 20 Jul 2014 18:55:40 +0000
Resent-Message-Id: <E1X8wGq-0005Ml-6h@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <martin.thomson@gmail.com>) id 1X8wGe-0005Lx-Kk for ietf-http-wg@listhub.w3.org; Sun, 20 Jul 2014 18:55:28 +0000
Received: from mail-wi0-f170.google.com ([209.85.212.170]) by lisa.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <martin.thomson@gmail.com>) id 1X8wGd-0004Pc-IY for ietf-http-wg@w3.org; Sun, 20 Jul 2014 18:55:28 +0000
Received: by mail-wi0-f170.google.com with SMTP id f8so3230843wiw.1 for <ietf-http-wg@w3.org>; Sun, 20 Jul 2014 11:55:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=VJc95PNlnikw9B+AfGj/DPxmjIP4EDmTYYr7pRnnie4=; b=XONbjcTdYi/EUxgbyB5gBP8MkU9RogVnTsAYqTx5bFhlRcC3KM94F+S0AQdtzS4ufv rZrIEWiOhBHModyEEBZh4oPsB/pn1LJ0wxCHFZkp38AeIvMTTayqctiyWt05pMl3f/MT Zzi6661OQhkJBQ60FLZM98qr1ytJCHXNH9jD49rTqOKWPsP7dPEEmVqkV/mXHGDlpMcw cOqwvNR27eOBNu+ME+wpVRWriNVj8kT60YAoFl2jan6Ff1ow03/x+1n4PtBh7KswR+lR kPT4YmVWDeZCwbj+4HPtF8SEywoTeUbfsiAZ/DNM8qpwM8Q+vgAqDEWynUfikYiRAqno Zs7g==
MIME-Version: 1.0
X-Received: by 10.180.92.38 with SMTP id cj6mr26644305wib.64.1405882501265; Sun, 20 Jul 2014 11:55:01 -0700 (PDT)
Received: by 10.194.110.6 with HTTP; Sun, 20 Jul 2014 11:55:01 -0700 (PDT)
Received: by 10.194.110.6 with HTTP; Sun, 20 Jul 2014 11:55:01 -0700 (PDT)
In-Reply-To: <20140720101132.5D9A45BC011@smtp4.welho.com>
References: <20140720101132.5D9A45BC011@smtp4.welho.com>
Date: Sun, 20 Jul 2014 11:55:01 -0700
Message-ID: <CABkgnnWJmJL0zVN_8sD+9Bda7rBKFe5=YP7Hxfdv5qLoKdxkUw@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
To: Kari Hurtta <hurtta-ietf@elmme-mailer.org>
Cc: HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="f46d043c7faa15801304fea4872d"
Received-SPF: pass client-ip=209.85.212.170; envelope-from=martin.thomson@gmail.com; helo=mail-wi0-f170.google.com
X-W3C-Hub-Spam-Status: No, score=-3.5
X-W3C-Hub-Spam-Report: AWL=-2.733, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: lisa.w3.org 1X8wGd-0004Pc-IY 413ef308a0430ee0477a3d7e4f1b6735
X-Original-To: ietf-http-wg@w3.org
Subject: Re: draft-ietf-httpbis-http2-latest, 8.1.2.5 Malformed Requests and Responses, response of HEAD request
Archived-At: <http://www.w3.org/mid/CABkgnnWJmJL0zVN_8sD+9Bda7rBKFe5=YP7Hxfdv5qLoKdxkUw@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/26162
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

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
>