Re: #409: is parsing OBS-FOLD mandatory?

Willy Tarreau <w@1wt.eu> Sun, 20 January 2013 09:46 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 (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4E52B21F8506 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 20 Jan 2013 01:46:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.599
X-Spam-Level:
X-Spam-Status: No, score=-10.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eBW4uqsIluhA for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 20 Jan 2013 01:46:38 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id DAB1521F8505 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sun, 20 Jan 2013 01:46:38 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1TwrSu-0002Xb-7F for ietf-http-wg-dist@listhub.w3.org; Sun, 20 Jan 2013 09:45:24 +0000
Resent-Date: Sun, 20 Jan 2013 09:45:24 +0000
Resent-Message-Id: <E1TwrSu-0002Xb-7F@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <w@1wt.eu>) id 1TwrSp-0002WE-VH for ietf-http-wg@listhub.w3.org; Sun, 20 Jan 2013 09:45:19 +0000
Received: from 1wt.eu ([62.212.114.60]) by maggie.w3.org with esmtp (Exim 4.72) (envelope-from <w@1wt.eu>) id 1TwrSo-0005Jd-8j for ietf-http-wg@w3.org; Sun, 20 Jan 2013 09:45:19 +0000
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id r0K9imWH014469; Sun, 20 Jan 2013 10:44:48 +0100
Date: Sun, 20 Jan 2013 10:44:48 +0100
From: Willy Tarreau <w@1wt.eu>
To: Mark Nottingham <mnot@mnot.net>
Cc: "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>, Roy Fielding <fielding@gbiv.com>
Message-ID: <20130120094448.GK6838@1wt.eu>
References: <12F24972-5720-40B7-BF17-3A1955752199@mnot.net> <1D461B53-7FF5-41EB-A891-5B309F116DF0@gbiv.com> <20121212211838.GC19220@1wt.eu> <3BDA9E87-5771-49D3-A739-AA1B1F179484@mnot.net> <20121219071858.GD21050@1wt.eu> <2536D335-9BA5-49E2-B49A-2475C069E4D8@mnot.net> <8ADB8661-7EBB-429A-80BD-F38884751882@mnot.net> <20130120074434.GH6838@1wt.eu> <85B3A89F-264E-4BED-9D76-2E0F3B9BB4EC@mnot.net>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <85B3A89F-264E-4BED-9D76-2E0F3B9BB4EC@mnot.net>
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=-3.9
X-W3C-Hub-Spam-Report: AWL=-2.034, BAYES_00=-1.9, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1TwrSo-0005Jd-8j b071f43c7db582fed32811ed0803fe78
X-Original-To: ietf-http-wg@w3.org
Subject: Re: #409: is parsing OBS-FOLD mandatory?
Archived-At: <http://www.w3.org/mid/20130120094448.GK6838@1wt.eu>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/16041
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 Sun, Jan 20, 2013 at 08:26:42PM +1100, Mark Nottingham wrote:
> Proposal:
> 
> """
> Historically, HTTP header field values could be extended over multiple lines by preceding each extra line with at least one space or horizontal tab (obs-fold). This specification deprecates such line folding except within the message/http media type (Section 7.3.1). Senders MUST NOT generate messages that include line folding (i.e., that contain any field-value that matches the obs-fold rule) unless the message is intended for packaging within the message/http media type. Recipients MUST either:
> 
>   - accept line folding and replace any embedded obs-fold whitespace with either a single SP or a matching number of SP octets (to avoid buffer copying) prior to interpreting the field value or forwarding the message downstream, or
> 
>   - reject a message with line folding present. Servers can do for requests by responding with 400 Bad Request and a representation explaining the condition; clients can only discard the message.
> 
> In particular, recipients who choose not to implement obs-fold processing (as described above) MUST NOT accept messages containing headers with leading whitespace, as this can expose them to attacks that exploit this difference in processing.
> """

Seems perfect to me :-)

Cheers,
Willy