Re: [http-state] Conformance classes

Adam Barth <ietf@adambarth.com> Wed, 16 December 2009 18:09 UTC

Return-Path: <adam@adambarth.com>
X-Original-To: http-state@core3.amsl.com
Delivered-To: http-state@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 3FFD73A69BB for <http-state@core3.amsl.com>; Wed, 16 Dec 2009 10:09:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.967
X-Spam-Level:
X-Spam-Status: No, score=-1.967 tagged_above=-999 required=5 tests=[AWL=0.010, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zB6w4ka-CgGh for <http-state@core3.amsl.com>; Wed, 16 Dec 2009 10:09:41 -0800 (PST)
Received: from mail-pz0-f176.google.com (mail-pz0-f176.google.com [209.85.222.176]) by core3.amsl.com (Postfix) with ESMTP id 33E883A6A05 for <http-state@ietf.org>; Wed, 16 Dec 2009 10:09:41 -0800 (PST)
Received: by pzk6 with SMTP id 6so833167pzk.29 for <http-state@ietf.org>; Wed, 16 Dec 2009 10:09:24 -0800 (PST)
MIME-Version: 1.0
Received: by 10.142.61.41 with SMTP id j41mr852572wfa.298.1260986959062; Wed, 16 Dec 2009 10:09:19 -0800 (PST)
In-Reply-To: <alpine.DEB.2.00.0912161355170.21529@tvnag.unkk.fr>
References: <7789133a0912141541n70180adchba637f96ae4daf8d@mail.gmail.com> <D6082C37-3553-48A1-BFB9-2788DE2F91B8@gbiv.com> <7789133a0912150121u5567d076ue2f95496ea05ce03@mail.gmail.com> <4EC7C553-2D72-456C-BF41-DCD010E99DED@gbiv.com> <7789133a0912151213r1f469154x4ca2ffe7e9920d58@mail.gmail.com> <alpine.DEB.2.00.0912152219340.20887@tvnag.unkk.fr> <7789133a0912151358i1d7e48b2s2b125e51884d87c3@mail.gmail.com> <alpine.DEB.2.00.0912152303410.20887@tvnag.unkk.fr> <188647A0-5178-4069-A6A7-D16997112F73@apple.com> <alpine.DEB.2.00.0912161355170.21529@tvnag.unkk.fr>
From: Adam Barth <ietf@adambarth.com>
Date: Wed, 16 Dec 2009 10:08:59 -0800
Message-ID: <7789133a0912161008q1dd6725bg91e7208b99ac1c05@mail.gmail.com>
To: Daniel Stenberg <daniel@haxx.se>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Cc: "Roy T. Fielding" <fielding@gbiv.com>, http-state <http-state@ietf.org>
Subject: Re: [http-state] Conformance classes
X-BeenThere: http-state@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Discuss HTTP State Management Mechanism <http-state.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/http-state>, <mailto:http-state-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/http-state>
List-Post: <mailto:http-state@ietf.org>
List-Help: <mailto:http-state-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/http-state>, <mailto:http-state-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 16 Dec 2009 18:09:42 -0000

Daniel,

My understanding of your position is that we should make the entire
cookie protocol (meaning everything the user agent is required to
understand) conforming for servers.  We can then recommend (at the
SHOULD level?) that servers stick to a subset of the protocol that's
easier to understand / has cleaner semantics.

Is that correct?  If so, that seems reasonable to me.

Adam


On Wed, Dec 16, 2009 at 5:51 AM, Daniel Stenberg <daniel@haxx.se> wrote:
> On Tue, 15 Dec 2009, Maciej Stachowiak wrote:
>
>>> Set-Cookie: headers that are using illegal syntaxes should be ignored.
>>
>> Why is "ignore" the only acceptable behavior when processing a
>> nonconforming header field?
>
> Because that's the sane way to treat protocol errors. If we deem another way
> to be the correct way, then the protocol dictates this and then it isn't
> nonconforming anymore.
>
>> Or to turn it around, why must everything with a processing requirement
>> for the recipient other than "ignore" be considered legal to send?
>
> I don't necessarily think that incoming must match outgoing, but if a client
> is supposed to accept incoming Set-Cookie: headers given a certain format,
> then that format is the legal one. If then some cases of accepted headers
> lead to a different action and a different output in subsequent requests,
> then the spec should detail this.
>
>> Surely it can be rational to define error handling other than "ignore" in
>> at least some cases.
>
> Like how? In this case it was not even suggested to be treated as "error
> handling" but simply to pretend that the misformed incoming header is valid
> and then generate an invalid header back and thus produce another
> non-conformant header. That's not my idea of error handling.
>
>> For example, HTML4.01 requires clients to render the contents of unknown
>> elements, even though such elements are a conformance error for the producer
>> of the document.
>
> 1) This is not HTML and I don't think HTML rules or thoughts apply very good
> on httpstate and 2) I'm not sure I even agree that those are good ideas for
> HTML.
>
>> We have here a situation where there are both legacy servers and legacy
>> clients. Sending certain unusual constructs may break some legacy clients.
>
> I think you're turning this into too many shades of grey. While it may be
> hard, I truly believe we will be much better off by clearly specifying what
> is conforming to the spec and what is not. Incoming headers that aren't
> legal can and should be ignored.
>
> If certain bugs (yes I view them as bugs) are significant enough to be
> supported by general clients and servers to make them interoperable to a
> satisfying level, then we make them part of this spec. And then we stop
> viewing them as bugs.
>
> If the bugs are minor enough to not cause a noticable difference, we make
> them remain bugs and they do not make it to the spec. In this category I
> consider the nameless cookies and the requirement on sort order to be.
>
> The greyness here is only where we draw the line and we can argue back and
> forth of what to consider actual practise and what's a bug and so on, but
> inside the spec there should (ideally) be no doubt.
>
>> Thus, it is prudent that new servers not do so.
>
> Isn't that why we use SHOULD and MUST NOT etc in specs?
>
>> The fact that the required syntax to accept is broader than the legal
>> syntax to send is unfortunate, but not fundamentally illogical.
>
> It could indeed be wider, it should just clearly state what the accecept
> syntax is. As well as for the sending one.
>
> --
>
>  / daniel.haxx.se
>