Re: Semantic meaning of double quotation marks delimiting quoted-string

Geoffrey Sneddon wrote:
>> The simple answer is: the double quotes are part of the entity tag. So 
>> a response header such as
>>
>>     ETag: x
>>
>> would simply be invalid and should be ignored.
> 
> I am aware — but how is the receiving end meant to deal with them? Is it 
> meant to keep the quotation marks around any quoted-string, even when 
> that therefore results in non-exist things like a character set called 
> "UTF-8" (with quotes)? Or does the behaviour need to be specific to each 
> and every use of quoted-string need to have it defined separately?

That may be the case.

Do you have a specific header in mind? I just followed the grammar for 
"Accept-Charset", and as far as I can tell if you have double quotes in 
a charset value, it should be considered part of the charset name:

   Accept-Charset = "Accept-Charset" ":"
            1#( ( charset | "*" )[ ";" "q" "=" qvalue ] )

(<http://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.14.2>)

  charset = token

(<http://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.3.4>)

     token          = 1*<any CHAR except CTLs or separators>
     separators     = "(" | ")" | "<" | ">" | "@"
                    | "," | ";" | ":" | "\" | <">
                    | "/" | "[" | "]" | "?" | "="
                    | "{" | "}" | SP | HT

     CHAR           = <any US-ASCII character (octets 0 - 127)>

(<http://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.2.2>)

Now that really smells like something that is implemented differently in 
practice...

BR, Julian

Received on Sunday, 28 October 2007 20:54:13 UTC