W3C home > Mailing lists > Public > ietf-http-wg@w3.org > April to June 2013

Re: WGLC p7: Parsing auth challenges

From: Julian Reschke <julian.reschke@gmx.de>
Date: Tue, 30 Apr 2013 13:43:16 +0200
Message-ID: <517FAE54.5070801@gmx.de>
To: Ben Niven-Jenkins <ben@niven-jenkins.co.uk>
CC: HTTP Working Group <ietf-http-wg@w3.org>
On 2013-04-29 20:55, Ben Niven-Jenkins wrote:
> Hi,
> In sections 2.1 & 4.4 (and by reference 4.2) of p7 User Agents are guided to take "special care" when parsing WWW-Authenticate and/or Proxy-Authenticate header field values, but it is never plainly stated what that means.
>  From the grammar, it looks as if the critical distinction is that (ignoring any allowed whitespace for brevity):
> A sequence "," token "=" means we are now receiving a parameter to an existing challenge. This is guaranteed because the "=" and value are non-optional components of auth-param. (The grammar would be unresolvably ambiguous otherwise.)
> A sequence "," token and anything other than "=" means we are now receiving the start of a new challenge. This is guaranteed because token68 may not contain "," and token (for a following auth-param) may not be empty. (The grammar would be unresolvably ambiguous otherwise.)

Right (or something invalid).

> (And if we don't get something, after whitespace elimination, which is either the end of the header field value or a token after the ",", then the value is invalid and should be rejected.)

You could have an empty list entry, such as in

  WWW-Authenticate: Basic realm="foo", , Basic realm="bar"

> If that interpretation is correct, it would be helpful to state this clearly, rather than merely infer it. (And if that interpretation is not correct, clearly relying on inference alone is unreliable!)

The interpretation is correct. Can you make a more concrete proposal?

> There is perhaps still the question of whether in the face of multiple WWW/Proxy-Authenticate headers, the implied "," separating their values according to #rule is still allowed to operate at both levels of the grammar, or only at the outermost (#challenge) level.

Not sure about what you're asking. Can you provide an example?

Best regards, Julian
Received on Tuesday, 30 April 2013 11:43:47 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:10 UTC