Subject: Re: Typo in RFC 2608?

From: James Kempf <[email-masked]>
Date: Fri, 7 Jul 2000 10:50:16 -0700 (PDT)

bute 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 
>...
>

This looks accurate to me. A string can contain reserved characters,
as you mention.

>
> 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
>...

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
	
		jak

---

From: Evan Hughes <[email-masked]>
Date: Mon, 10 Jul 2000 10:05:21 -0400 (EDT)

> This looks accurate to me. A string can contain reserved characters,

  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. =)

> 	\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

thanks,

e