Subject: Do ALTSVC parameters need to have a value?

From: Bence Béky <[email-masked]>
Date: Thu, 23 Apr 2015 08:19:44 -0400

Hi,

I need some clarification.  I am writing a parser for ALTSVC header
fields and wish to ignore unknown parameters.  However, it is unclear
to me whether a parameter without "=value" should be ignored or
treated as malformed.

draft-ietf-httpbis-alt-svc-06 Section 3 refers to "parameter".
Section 1.1 says "parameter" is defined in RFC7230.  In fact, RFC7230
has "transfer-parameter" but not "parameter".  Also, RFC7230 Section
says "Parameters are in the form of a name or name=value pair.",
implicilty allowing names without values, but in the next line
"transfer-parameter" is defined as a name=value pair, which disallowes
names without values.  On the other hand, RFC7231 Section 3.1.1.1
defines "parameter" as a name=value pair, but this is not what
draft-ietf-httpbis-alt-svc-06 refers to.

Thank you,

Bence

---

From: Julian Reschke <[email-masked]>
Date: Thu, 23 Apr 2015 14:48:40 +0200

> to me whether a parameter without "=value" should be ignored or

Good catch.

> says "Parameters are in the form of a name or name=value pair.",

I believe that's a bug that we introduced in 7230.

> draft-ietf-httpbis-alt-svc-06 refers to.

The intent was to use

   parameter      = token "=" ( token / quoted-string )

I'll add that in the next version.

Best regards, Julian

---

From: Bence Béky <[email-masked]>
Date: Thu, 23 Apr 2015 09:31:57 -0400

Thank you very much for the clarification.  B

---

From: "Roy T. Fielding" <[email-masked]>
Date: Thu, 23 Apr 2015 10:24:11 -0700

> On Apr 23, 2015, at 5:48 AM, Julian Reschke <[email-masked]> wrote:

Not a bug -- intentional change to reduce dependencies between parts.
The "transfer-parameter" is ABNF.  They are still parameters, in prose.

The real problem is that the draft is pointing to the wrong RFC:

   https://tools.ietf.org/html/rfc7231#section-3.1.1

....Roy

---

From: Julian Reschke <[email-masked]>
Date: Thu, 23 Apr 2015 19:25:31 +0200

>     https://tools.ietf.org/html/rfc7231#section-3.1.1

The bug being that the prose (in 7230) says "Parameters are in the form 
of a name or name=value pair", while the ABNF requires a value.

Best regards, Julian