Re: [Technical Errata Reported] RFC7230 (4412)

Willy Tarreau <w@1wt.eu> Thu, 09 July 2015 21:34 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@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 648241A0636 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 9 Jul 2015 14:34:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.912
X-Spam-Level:
X-Spam-Status: No, score=-6.912 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 0Akmy0swjoRh for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 9 Jul 2015 14:34:21 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EF7B31A0470 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 9 Jul 2015 14:34:20 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1ZDJPn-0004nI-GS for ietf-http-wg-dist@listhub.w3.org; Thu, 09 Jul 2015 21:31:31 +0000
Resent-Date: Thu, 09 Jul 2015 21:31:31 +0000
Resent-Message-Id: <E1ZDJPn-0004nI-GS@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <w@1wt.eu>) id 1ZDJPl-0004mG-DH for ietf-http-wg@listhub.w3.org; Thu, 09 Jul 2015 21:31:29 +0000
Received: from wtarreau.pck.nerim.net ([62.212.114.60] helo=1wt.eu) by lisa.w3.org with esmtp (Exim 4.80) (envelope-from <w@1wt.eu>) id 1ZDJPj-00076G-BO for ietf-http-wg@w3.org; Thu, 09 Jul 2015 21:31:28 +0000
Received: (from willy@localhost) by pcw.home.local (8.14.3/8.14.3/Submit) id t69LTZqr026569; Thu, 9 Jul 2015 23:29:35 +0200
Date: Thu, 09 Jul 2015 23:29:35 +0200
From: Willy Tarreau <w@1wt.eu>
To: Zhong Yu <zhong.j.yu@gmail.com>
Cc: RFC Errata System <rfc-editor@rfc-editor.org>, "Roy T. Fielding" <fielding@gbiv.com>, Julian Reschke <julian.reschke@greenbytes.de>, Barry Leiba <barryleiba@computer.org>, Mark Nottingham <mnot@mnot.net>, Rick Taylor <rick@tropicalstormsoftware.com>, HTTP Working Group <ietf-http-wg@w3.org>
Message-ID: <20150709212935.GK26380@1wt.eu>
References: <20150709104401.63318180092@rfc-editor.org> <CACuKZqFm6uxMT_yOKYR6bqB8D4CzUoexr=5xFeiuAGA+fhx+iQ@mail.gmail.com> <20150709150804.GG26380@1wt.eu> <CACuKZqFVfNLcg_CPx6vpigXi=nvBMDcy1dpb6+CgjePU9=iVDw@mail.gmail.com> <20150709204331.GJ26380@1wt.eu> <CACuKZqEiB1cRCoQVSqLSoZE1+Kv3DiuUbiY8kUy5OqwiRWOoYw@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CACuKZqEiB1cRCoQVSqLSoZE1+Kv3DiuUbiY8kUy5OqwiRWOoYw@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Received-SPF: pass client-ip=62.212.114.60; envelope-from=w@1wt.eu; helo=1wt.eu
X-W3C-Hub-Spam-Status: No, score=-7.0
X-W3C-Hub-Spam-Report: AWL=0.923, BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_IRA=-1, W3C_IRR=-3, W3C_WL=-1
X-W3C-Scan-Sig: lisa.w3.org 1ZDJPj-00076G-BO ecad24121c19810cc1a81c755bf2a363
X-Original-To: ietf-http-wg@w3.org
Subject: Re: [Technical Errata Reported] RFC7230 (4412)
Archived-At: <http://www.w3.org/mid/20150709212935.GK26380@1wt.eu>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/29911
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>

On Thu, Jul 09, 2015 at 04:11:10PM -0500, Zhong Yu wrote:
> On Thu, Jul 9, 2015 at 3:43 PM, Willy Tarreau <w@1wt.eu> wrote:
> 
> > On Thu, Jul 09, 2015 at 01:33:46PM -0500, Zhong Yu wrote:
> > > The spec does allow a response like
> > >
> > > HTTP/1.1 200 OK
> > > Content-Type: text/plain
> > > Transfer-Encoding: gzip
> > > Connection: close
> >
> > No it does not allow it as chunked is not last. It's in 3.3.1 :
> >
> >    If any transfer coding
> >    other than chunked is applied to a request payload body, the sender
> >    MUST apply chunked as the final transfer coding to ensure that the
> >    message is properly framed.
> >
> 
> This text talk about "REQUEST" only :) The next sentence talks about
> "RESPONSE" -

Hmm yes, good catch, sorry!

> > If any transfer coding other than chunked is applied to a response
> payload body, the sender MUST either apply chunked as the final transfer
> coding or terminate the message by closing the connection.
> 
> 
> Apparently, the text is prune to misreading.

Indeed, I didn't pay attention, I tend to consider that the rule
applies to both directions, though the strict control in haproxy
clearly is only for the request, just as specified.

So yes, the spec allows it and also specifies how to process it.
I doubt any server find it fun to play this game given that we
all know that connection-delimited bodies are prone to silent
truncation, but that doesn't mean no server does it.

Regards,
Willy