Re: Ambiguities in header-field rules (p1-messaging)
Frank Mertens <frank@cyblogic.de> Thu, 18 August 2011 08:06 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 C857421F8AC3 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 18 Aug 2011 01:06:45 -0700 (PDT)
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 ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RXuLamEvkD4V for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 18 Aug 2011 01:06:45 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 0627221F8ADC for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 18 Aug 2011 01:06:44 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.69) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1QtxcV-0002Bf-Nj for ietf-http-wg-dist@listhub.w3.org; Thu, 18 Aug 2011 08:06:31 +0000
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.69) (envelope-from <ylafon@w3.org>) id 1QtxcJ-0002AM-7A for ietf-http-wg@listhub.w3.org; Thu, 18 Aug 2011 08:06:19 +0000
Received: from jay.w3.org ([128.30.52.169]) by lisa.w3.org with esmtp (Exim 4.72) (envelope-from <ylafon@w3.org>) id 1QtxcI-0006eT-Qd for ietf-http-wg@w3.org; Thu, 18 Aug 2011 08:06:18 +0000
Received: from ylafon by jay.w3.org with local (Exim 4.69) (envelope-from <ylafon@w3.org>) id 1QtxcJ-0003T1-1o for ietf-http-wg@w3.org; Thu, 18 Aug 2011 04:06:19 -0400
X-Return-path: <listmaster@w3.org>
X-Received: from maggie.w3.org ([128.30.52.39]) by jay.w3.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from <listmaster@w3.org>) id 1QtxV9-0002ws-6y for ylafon@jay.w3.org; Thu, 18 Aug 2011 03:58:55 -0400
X-Received: from frink.w3.org ([128.30.52.56]) by maggie.w3.org with esmtp (Exim 4.72) (envelope-from <listmaster@w3.org>) id 1QtxV8-000654-JP for ylafon@w3.org; Thu, 18 Aug 2011 07:58:54 +0000
X-Received: from lists by frink.w3.org with local (Exim 4.69) (envelope-from <listmaster@w3.org>) id 1QtxV9-0004gV-0M for ylafon@w3.org; Thu, 18 Aug 2011 07:58:55 +0000
X-From_: frank@cyblogic.de Thu Aug 18 07:58:54 2011
X-Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.69) (envelope-from <frank@cyblogic.de>) id 1QtxV8-0004gD-RE for ietf-http-wg-request@listhub.w3.org; Thu, 18 Aug 2011 07:58:54 +0000
X-Received: from cyblogic.com ([109.239.57.159] ident=postfix) by maggie.w3.org with esmtp (Exim 4.72) (envelope-from <frank@cyblogic.de>) id 1QtxV7-00064X-BW for ietf-http-wg-request@w3.org; Thu, 18 Aug 2011 07:58:54 +0000
X-Received: from [192.168.1.15] (mnch-d9bdabfa.pool.mediaWays.net [217.189.171.250]) by cyblogic.com (Postfix) with ESMTPSA id DFC5D1000C for <ietf-http-wg-request@w3.org>; Thu, 18 Aug 2011 09:56:21 +0200 (CEST)
Message-ID: <4E4CC609.7070500@cyblogic.de>
Old-Date: Thu, 18 Aug 2011 09:58:01 +0200
From: Frank Mertens <frank@cyblogic.de>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110626 Icedove/3.1.11
MIME-Version: 1.0
To: ietf-http-wg-request@w3.org
References: <4E4C013D.2090407@cyblogic.de> <88b489507e504d9eef318438194f929e@treenet.co.nz>
In-Reply-To: <88b489507e504d9eef318438194f929e@treenet.co.nz>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=109.239.57.159; envelope-from=frank@cyblogic.de; helo=cyblogic.com
X-W3C-Hub-Spam-Status: No, score=-1.9
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1QtxV7-00064X-BW fa19eda4e5a5f4bb2841aea20ac1bd5a
Old-X-Envelope-To: ietf-http-wg-request
Date: Thu, 18 Aug 2011 07:58:55 +0000
X-DSPAM-Result: Innocent
X-DSPAM-Processed: Thu Aug 18 03:58:57 2011
X-DSPAM-Confidence: 0.9994
X-DSPAM-Improbability: 1 in 163565 chance of being spam
X-DSPAM-Probability: 0.0000
X-DSPAM-Signature: 4e4cc641113476747094056
ReSent-Date: Thu, 18 Aug 2011 04:06:14 -0400
ReSent-From: Yves Lafon <ylafon@w3.org>
ReSent-To: ietf-http-wg@w3.org
ReSent-Subject: Re: Ambiguities in header-field rules (p1-messaging)
ReSent-User-Agent: Alpine 1.10 (DEB 962 2008-03-14)
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Ambiguities in header-field rules (p1-messaging)
Archived-At: <http://www.w3.org/mid/4E4CC609.7070500@cyblogic.de>
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/11213
X-Loop: ietf-http-wg@w3.org
Sender: ietf-http-wg-request@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>
Resent-Message-Id: <E1QtxcV-0002Bf-Nj@frink.w3.org>
On 08/18/2011 05:16 AM, Amos Jeffries wrote: > On Wed, 17 Aug 2011 19:58:21 +0200, Frank Mertens wrote: >> Hi, >> >> I played around with the ABNF published by this WG and stumbled >> over some rough edges. >> >> Current rules: >> >> OWS = *( [ obs-fold ] WSP ) >> header-field = field-name ":" OWS [ field-value ] OWS >> field-value = *( field-content / OWS ) >> field-content = *( WSP / VCHAR / obs-text ) >> >> Problems: >> >> - field-value and field-content match the empty symbol, >> which requires searching for the longest match, which is costly >> (and confusing for the human reader) >> - because field-value matches the empty symbol claiming it optional >> in header-field allows ambiguous productions of same length >> (with or without field-value of zero length?) >> >> Suggested improvement: >> >> field-value = 1*( field-content OWS ) >> field-content = 1*( VCHAR / WSP / obs-text ) >> >> Best Regards, >> Frank Mertens. > > > The OWS on header-field remains ambiguous as well. > > Also, with WSP being in field-content there is the possibility of header-field matching: > > field-name ":" [ obs-fold ] 1*( WSP OWS ) OWS > > Nasty. But section 3.2 comes to the rescue: > "The field value does not include any leading or trailing white space" > and > "HTTP/1.1 senders MUST NOT produce messages that include line folding" > > So OWS in the field-value ABNF appears to be invalid in several ways going by the text. > > > Perhapse this would be better: > > header-field = field-name ":" [ WSP ] BWS [ field-value ] > field-value = 1*( field-content BWS ) > field-content = 1*( VCHAR / WSP / obs-text ) > > > > > Nit: section 1.2.2 currently says: > > "Multiple OWS octets that occur within field-content > SHOULD be replaced with a single SP before interpreting the field > value or forwarding the message downstream." > ... > "Multiple RWS octets that occur within field-content SHOULD be > replaced with a single SP before interpreting the field value or > forwarding the message downstream. > " > > When there is no OWS or RWS in the field-content ABNF. > > I think both should say header-field instead of field-content. Or maybe drop the "within field-content" condition to make it general. > > > AYJ > > Yes, maybe we should also have a strict version of the grammar. But for now, I'm happy with a working tolerant one;) Replacing OWS by BWS would also disable support for line folding. FM
- Ambiguities in header-field rules (p1-messaging) Frank Mertens
- Re: Ambiguities in header-field rules (p1-messagi… Amos Jeffries
- Re: Ambiguities in header-field rules (p1-messagi… Frank Mertens
- Re: Ambiguities in header-field rules (p1-messagi… Frank Mertens
- Re: Ambiguities in header-field rules (p1-messagi… Amos Jeffries
- Re: Ambiguities in header-field rules (p1-messagi… Frank Mertens
- Re: Ambiguities in header-field rules (p1-messagi… Roy T. Fielding
- Re: Ambiguities in header-field rules (p1-messagi… Julian Reschke