Re: [Technical Errata Reported] RFC7230 (4189)

Zhong Yu <zhong.j.yu@gmail.com> Wed, 22 April 2015 14:00 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 826131A9143 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 22 Apr 2015 07:00:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.412
X-Spam-Level:
X-Spam-Status: No, score=-6.412 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, J_CHICKENPOX_52=0.6, 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 GYL_JqaZvDbD for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 22 Apr 2015 07:00:04 -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 B34E61A9139 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 22 Apr 2015 07:00:02 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1Ykv7r-0006yv-RJ for ietf-http-wg-dist@listhub.w3.org; Wed, 22 Apr 2015 13:55:39 +0000
Resent-Date: Wed, 22 Apr 2015 13:55:39 +0000
Resent-Message-Id: <E1Ykv7r-0006yv-RJ@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.80) (envelope-from <zhong.j.yu@gmail.com>) id 1Ykv7l-0006yE-La for ietf-http-wg@listhub.w3.org; Wed, 22 Apr 2015 13:55:33 +0000
Received: from mail-ob0-f170.google.com ([209.85.214.170]) by maggie.w3.org with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from <zhong.j.yu@gmail.com>) id 1Ykv7k-0003dz-Eu for ietf-http-wg@w3.org; Wed, 22 Apr 2015 13:55:33 +0000
Received: by obbeb7 with SMTP id eb7so170333775obb.3 for <ietf-http-wg@w3.org>; Wed, 22 Apr 2015 06:55:06 -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=KvoO3LaNZjzKJ7/J5hLTXQSWzgvg0AK0ywy0tpppCGY=; b=a4VgioMn5g8ife6zjNjyong3g/fV09W9px0bEytdXga4SW6GGuvO2A2DlhnoCc7CuV AUDM3bJRrIF4lkXPghaPTyiPla8QTJ/cZU8zpg68zDYuZiVK0m/9BnR3t1RaUuB6GbBs w/CIl+pw3VaLG50sZBy15u6/McZ1PzzsP/gmb+OjbpH/3hSISQ+SB9BxYpJqAtOBFtLe 86yJSd4CjeOohGOobYzF+R/rAQB5DHjBALU4l8AR/oN+AblmWNBj2xoH5clXJfsF48yE qomoSPOxI4x3lNVYQ//+ICRakYziLUjXPxMOKmDNb13JfSYt5wuc31Hthn9ml8gkGWps Sh1A==
MIME-Version: 1.0
X-Received: by 10.182.186.100 with SMTP id fj4mr23837901obc.12.1429710906552; Wed, 22 Apr 2015 06:55:06 -0700 (PDT)
Received: by 10.76.72.34 with HTTP; Wed, 22 Apr 2015 06:55:06 -0700 (PDT)
In-Reply-To: <20150422043125.GC23762@1wt.eu>
References: <20141126195639.B3D5C181CE7@rfc-editor.org> <5476D0BC.70905@greenbytes.de> <CALaySJJh-9w2mnT9fV9dxaOJ_Tq=ipvV7nbNbEqY+g_6ppJjTg@mail.gmail.com> <723A86CD-6369-4A8A-B277-CBDA4439DCE9@gbiv.com> <55364CFE.1000007@gmx.de> <CACuKZqEUtPmph1QFgS8HAOvnxtpYm7eBNra9TwCCrOuNy0xGTg@mail.gmail.com> <20150422043125.GC23762@1wt.eu>
Date: Wed, 22 Apr 2015 08:55:06 -0500
Message-ID: <CACuKZqGWi5A_nGxU2L+T3rZGEM6yx5XzwUtP=r2qQ128jkHkCQ@mail.gmail.com>
From: Zhong Yu <zhong.j.yu@gmail.com>
To: Willy Tarreau <w@1wt.eu>
Cc: Julian Reschke <julian.reschke@gmx.de>, "Roy T. Fielding" <fielding@gbiv.com>, Barry Leiba <barryleiba@computer.org>, RFC Errata System <rfc-editor@rfc-editor.org>, Pete Resnick <presnick@qti.qualcomm.com>, Mark Nottingham <mnot@mnot.net>, Simon Schüppel <simon.schueppel@googlemail.com>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=209.85.214.170; envelope-from=zhong.j.yu@gmail.com; helo=mail-ob0-f170.google.com
X-W3C-Hub-Spam-Status: No, score=-4.5
X-W3C-Hub-Spam-Report: AWL=-1.696, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: maggie.w3.org 1Ykv7k-0003dz-Eu 38241ba3c976f2e38e102a66a09a4220
X-Original-To: ietf-http-wg@w3.org
Subject: Re: [Technical Errata Reported] RFC7230 (4189)
Archived-At: <http://www.w3.org/mid/CACuKZqGWi5A_nGxU2L+T3rZGEM6yx5XzwUtP=r2qQ128jkHkCQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/29369
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>

Well, Willy you are right that we cannot change a rule that has been
in effect for 20 years. If a parser doesn't follow the rule, it is a
bug, and it needs to be fixed.

Out of curiosity, I constructed the following response, and tested on
5 major browsers

HTTP/1.1 200 OK\r\n
Connection: close\r\n
Content-Type: text/plain;charset=UTF-8\r\n
<SP>\r\n
Server: test-folding\r\n
\r\n
123456789

IE displays the response as

Server: test-folding\r\n
\r\n
123456789

That doesn't seem right.

Zhong Yu
bayou.io




On Tue, Apr 21, 2015 at 11:31 PM, Willy Tarreau <w@1wt.eu> wrote:
> On Tue, Apr 21, 2015 at 10:24:47AM -0500, Zhong Yu wrote:
>> Another question about obs-fold before we proceed with the formal
>> definitions. Consider the following example
>>
>> foo: bar<CRLF>
>> <SP><CRLF>
>> ...
>>
>> It won't be surprising if some parser mistakes the 2nd line as an
>> "empty line" that terminates the headers. Visually it *is* an empty
>> line.
>>
>> In spirit, obs-fold should be followed by visible chars, otherwise
>> it's very confusing and problematic.
>
> I disagree, a parser doesn't "see" characters, it consumes them. Here
> you have a space after a CRLF, so it's a continuation of a folded header,
> that's as simple as that. And it's important that it's properly defined
> so that it's not abused by senders trying to put parsers in a situation
> which is not well defined.
>
>> RFC 822 $3.2 appears to suggest the same thing, that obs-fold can only
>> appear between two non-empty segments.
>
> And what is the parser supposed to do if it receives something which does
> not match this rule ? That's always the problem when adding exceptions to
> well-defined rules, it requires more work on the recipient side to properly
> handle the situation. In short, it *adds* more risks of confusion.
>
> Regards,
> Willy
>