Subject: Typo in RFC 2608?

From: Evan Hughes <[email-masked]>
Date: Fri, 7 Jul 2000 12:41:40 -0400 (EDT)

I think there  might be a couple of typos in the ABNF grammar that defines
attribute lists (RFC 2608, page 11):

String values are defined as:

strval = 1*safe-val
...
safe-val = ; Any character except reserved.
...
reserved = ... / `\' /...

 Does this mean that strings cannot contain escaped values? Should it be:

strval = 1*str-char
str-char = safe-val / escape-val 
...

 I have a similar question with opaque:

...
opaque = "\FF" 1*escape-val
...

 Does this mean that EVERY character in an opaque must be escaped? If so,
would it be (potentially) more bandwidth efficient to say:

...
opaque = "\FF" 1*str-char
...
[see above for defn of str-char]

e

---

From: James Kempf <[email-masked]>
Date: Mon, 10 Jul 2000 08:31:59 -0700 (PDT)

>> This looks accurate to me. A string can contain reserved characters,
>> as you mention.
>
>  I'm note sure which production you're referring to, so I'll justify the
>one I suggested. (Isn't email a great medium? =)
>
>  Using the production from RFC 2608, strval (the value of a string
>attribute) can contain "Any character except reserved". Since "\" is part
>of reserved, strval cannot contain a "\". This means that the string:
>
> "one, two, three"
>
>  which should be escaped to
>
> "one\2C two\2C three"
>
> is not a valid strval, since it contains a "\". Since strval is not
>allowed to contain a "\", _no_ value in the string may be escaped. 
>
> It is possible that I'm misreading the ABNF. =)
>

Sorry, what I meant was you are correct, there is a typo.

>> No, the idea is that an opaque consists of a sequence of escaped bytes.
>> The escaped bytes consist of a backslash followed by the hex code
>> of the byte. So the BNF production in the spec is right. For example:
>> 
>> 	\FF\BA\DF\AD = 0xff, 0xba, 0xdf, 0xad
>
>Does every byte in an opaque need to be escaped, even if it isn't in the
>reserved range? 
>
>Which is the correct escaping of the following string:
>
>  a, 0xff, b, 0x02
>
>this:
>
>  \61\FF\63\02
>
>or this:
>
>  a\FFb\02
>
>

Yes, an opaque consistes of a sequence of bytes, regardless if
any are ASCII. An opaque always begins with \FF. So your example is:

	\FF\61\FF\63\02
	
Note that the first \FF is the opaque header, the second is
part of the sequence.

		jak