Re: [websec] Strict-Transport-Security syntax redux

Julian Reschke <> Sat, 29 October 2011 08:07 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 6DAF121F86C1 for <>; Sat, 29 Oct 2011 01:07:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -104.316
X-Spam-Status: No, score=-104.316 tagged_above=-999 required=5 tests=[AWL=-1.717, BAYES_00=-2.599, USER_IN_WHITELIST=-100]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id CgmpraPuux+u for <>; Sat, 29 Oct 2011 01:07:36 -0700 (PDT)
Received: from ( []) by (Postfix) with SMTP id 8337021F86AA for <>; Sat, 29 Oct 2011 01:07:35 -0700 (PDT)
Received: (qmail invoked by alias); 29 Oct 2011 08:07:34 -0000
Received: from (EHLO []) [] by (mp065) with SMTP; 29 Oct 2011 10:07:34 +0200
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1/8HNxCXQX8ZJ1PXBsL/mflag4/w4rsT9RM5X2lhG G9K6ffyb5alE4x
Message-ID: <>
Date: Sat, 29 Oct 2011 10:07:28 +0200
From: Julian Reschke <>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1
MIME-Version: 1.0
To: Adam Barth <>
References: <> <>
In-Reply-To: <>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Cc: IETF WebSec WG <>
Subject: Re: [websec] Strict-Transport-Security syntax redux
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Web Application Security Minus Authentication and Transport <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sat, 29 Oct 2011 08:07:36 -0000

On 2011-10-29 05:08, Adam Barth wrote:
> ...
>> Except for RFC6265, which in the algorithm for parsing "Max-Age=", it
>> algorithmically provides for ignoring a value that doesn't match the
>> effective value ABNF of..
>>   ["-"]*DIGIT
>> ..which would catch the max-age="1" case, but doesn't seem to explicitly
>> address..
>>   max-age=
> That's handled by some more general processing rules in the spec.  The
> net result is that it's ignored.
>> But in any case, perhaps (additional) browser implementor folk could chime
>> in here -- do we really need to address such detail-level issues (both of
>> the examples above and below) in the syntax/grammar we specify in specs such
>> as these? Or is the new ABNF proposed in the original message in this thread
>> sufficient?
> Generally, we prefer to be instructed exactly how to behave for every
> possible input (even illegal ones).  There's a long history of
> quoted-string not being implemented correctly by browsers.  I spec
> this as just splitting the string on ; and then processing each
> substring separately, ignoring bogus/future ones.  I know Julian has a
> dream that all HTTP headers will be parsed the same, but quoted-string
> is sufficiently ill-defined w.r.t. error handling that I prefer to
> avoid it.
> ...

- when discussing generic parsing, we need to distinguish between legacy 
cases like cookies, and new headers, where we can do better

- standardizing handling of broken headers is one thing (and in general 
I prefer not to), but that doesn't mean that when defining a new header 
field we shouldn't minimize the things a sender can get wrong; if we 
know that some recipients will accept both token and quoted-string 
anyway, then it seems like a good thing to simply allow them both, 
reducing the number of special-cases in parsing

- not sure what you mean by "ill-defined w.r.t. error handling"; it's 
defined just like most other syntax elements in HTTP -- is there 
something *specific* to quoted-string you have in mind?

Best regards, Julian