Re: [http-state] test data question

Adam Barth <ietf@adambarth.com> Tue, 22 November 2011 18:40 UTC

Return-Path: <ietf@adambarth.com>
X-Original-To: http-state@ietfa.amsl.com
Delivered-To: http-state@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1438321F8B40 for <http-state@ietfa.amsl.com>; Tue, 22 Nov 2011 10:40:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.618
X-Spam-Level:
X-Spam-Status: No, score=-2.618 tagged_above=-999 required=5 tests=[AWL=0.359, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 hwSsV-QuAGsm for <http-state@ietfa.amsl.com>; Tue, 22 Nov 2011 10:40:00 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by ietfa.amsl.com (Postfix) with ESMTP id E981421F8B42 for <http-state@ietf.org>; Tue, 22 Nov 2011 10:39:59 -0800 (PST)
Received: by iaeo4 with SMTP id o4so632324iae.31 for <http-state@ietf.org>; Tue, 22 Nov 2011 10:39:59 -0800 (PST)
Received: by 10.50.88.199 with SMTP id bi7mr23537316igb.45.1321987199409; Tue, 22 Nov 2011 10:39:59 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx.google.com with ESMTPS id j1sm35439297igq.2.2011.11.22.10.39.57 (version=SSLv3 cipher=OTHER); Tue, 22 Nov 2011 10:39:57 -0800 (PST)
Received: by iaeo4 with SMTP id o4so632265iae.31 for <http-state@ietf.org>; Tue, 22 Nov 2011 10:39:57 -0800 (PST)
Received: by 10.231.46.136 with SMTP id j8mr5269304ibf.43.1321987197102; Tue, 22 Nov 2011 10:39:57 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.67.130 with HTTP; Tue, 22 Nov 2011 10:39:26 -0800 (PST)
In-Reply-To: <CAJE5ia9ub1G7_BgsVW4J5kgayYc-6VBDAnijWq2=cPtGGh-M6Q@mail.gmail.com>
References: <4ECBCA44.2020800@oracle.com> <CAJE5ia9ub1G7_BgsVW4J5kgayYc-6VBDAnijWq2=cPtGGh-M6Q@mail.gmail.com>
From: Adam Barth <ietf@adambarth.com>
Date: Tue, 22 Nov 2011 10:39:26 -0800
Message-ID: <CAJE5ia92rUK1cfYiyo_rqqv8J9H-Lcc_y6e45kBnOf=3tX9G2A@mail.gmail.com>
To: Vasiliy Baranov <vasiliy.baranov@oracle.com>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Cc: http-state@ietf.org
Subject: Re: [http-state] test data question
X-BeenThere: http-state@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Discuss HTTP State Management Mechanism <http-state.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/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: Tue, 22 Nov 2011 18:40:01 -0000

On Tue, Nov 22, 2011 at 10:36 AM, Adam Barth <ietf@adambarth.com> wrote:
> Thanks for the report.  This is an error in the test suite, which I'll fix.

Done.

> The test is from an older version of the spec that allowed "valueless"
> cookies.  The working group decided to remove the concept of valueless
> cookies (we can look up the tracker number if you want to see exactly
> why).
>
> Thanks again,
> Adam
>
>
> On Tue, Nov 22, 2011 at 8:13 AM, Vasiliy Baranov
> <vasiliy.baranov@oracle.com> wrote:
>> Hello,
>>
>> I have a cookie implementation that attempts to follow RFC 6265. If I run it
>> against the test data found in https://github.com/abarth/http-state, the
>> following test fails:
>>
>>    tests/data/parser/name0032-test:
>>
>>        Set-Cookie: "foo\"bar;baz"=qux
>>
>>
>>    tests/data/parser/name0032-expected:
>>
>>        Set-Cookie: "foo\"bar
>>
>>
>> I am by no means an expert in this area but it seems to me this test goes
>> against the spec, in particular, the following statement found in RFC 6265
>> on page 17:
>>
>>   2.  If the name-value-pair string lacks a %x3D ("=") character,
>>       ignore the set-cookie-string entirely.
>>
>>
>> My understanding is, for the test in question the name-value-pair is
>> '"foo\"bar'. This name-value-pair obviously lacks the "=" character, so my
>> reading of the spec is the cookie should be rejected entirely. The test,
>> however, expects the cookie to be accepted and sent back to the server on
>> the subsequent request. Does that mean my reading of the spec is incorrect?
>>
>> I tried this test in Chrome 16.0.912.41 beta-m, Firefox 6.0.1, IE 8, and
>> Safari 5.0.5. It passes everywhere except for Safari and my poor
>> implementation.
>>
>> Thanks,
>> -- Vasiliy
>> _______________________________________________
>> http-state mailing list
>> http-state@ietf.org
>> https://www.ietf.org/mailman/listinfo/http-state
>>
>