Re: [http-state] test data question

Adam Barth <ietf@adambarth.com> Tue, 22 November 2011 18:37 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 3D2CE11E8082 for <http-state@ietfa.amsl.com>; Tue, 22 Nov 2011 10:37:09 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.605
X-Spam-Level:
X-Spam-Status: No, score=-2.605 tagged_above=-999 required=5 tests=[AWL=0.372, 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 r6g5-WPfmsca for <http-state@ietfa.amsl.com>; Tue, 22 Nov 2011 10:37:08 -0800 (PST)
Received: from mail-gx0-f172.google.com (mail-gx0-f172.google.com [209.85.161.172]) by ietfa.amsl.com (Postfix) with ESMTP id 9144E21F8AAF for <http-state@ietf.org>; Tue, 22 Nov 2011 10:37:08 -0800 (PST)
Received: by ggnp4 with SMTP id p4so610196ggn.31 for <http-state@ietf.org>; Tue, 22 Nov 2011 10:37:08 -0800 (PST)
Received: by 10.100.240.3 with SMTP id n3mr4530390anh.64.1321987028151; Tue, 22 Nov 2011 10:37:08 -0800 (PST)
Received: from mail-yw0-f44.google.com (mail-yw0-f44.google.com [209.85.213.44]) by mx.google.com with ESMTPS id i31sm41380792anm.19.2011.11.22.10.37.05 (version=SSLv3 cipher=OTHER); Tue, 22 Nov 2011 10:37:05 -0800 (PST)
Received: by ywt34 with SMTP id 34so562607ywt.31 for <http-state@ietf.org>; Tue, 22 Nov 2011 10:37:05 -0800 (PST)
Received: by 10.50.203.70 with SMTP id ko6mr23278998igc.19.1321987025185; Tue, 22 Nov 2011 10:37:05 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.67.130 with HTTP; Tue, 22 Nov 2011 10:36:34 -0800 (PST)
In-Reply-To: <4ECBCA44.2020800@oracle.com>
References: <4ECBCA44.2020800@oracle.com>
From: Adam Barth <ietf@adambarth.com>
Date: Tue, 22 Nov 2011 10:36:34 -0800
Message-ID: <CAJE5ia9ub1G7_BgsVW4J5kgayYc-6VBDAnijWq2=cPtGGh-M6Q@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:37:09 -0000

Thanks for the report.  This is an error in the test suite, which I'll fix.

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
>