rfc5987bis and common structure | Re: New Version Notification for draft-kamp-httpbis-structure-00.txt (fwd)

3.  HTTP/1 serialization of HTTP header Common Structure
https://tools.ietf.org/html/draft-kamp-httpbis-structure-00#section-3

|       h1_element = identifier * (";" identifier ["=" h1_value])
|
|       h1_value = identifier /
|               number /
|               h1_ascii_string /
|               h1_unicode_string /
|               h1_blob /
|               h1_timestamp /
|               h1_common-structure
|
|       h1_ascii_string = DQUOTE *(
|                       ( "\" DQUOTE ) /
|                       ( "\" "\" ) /
|                       0x20-21 /
|                       0x23-5B /
|                       0x5D-7E
|                       ) DQUOTE
|               # This is a proper subset of h1_unicode_string
|               # NB only allowed backslash escapes are \" and \\
|
|       h1_unicode_string = DQUOTE *(
|                       ( "\" DQUOTE )
|                       ( "\" "\" ) /
|                       ( "\" "u" 4*HEXDIG ) /
|                       0x20-21 /
|                       0x23-5B /
|                       0x5D-7E /
|                       0x80-F7
|                       ) DQUOTE
|               # XXX: how to say/import "UTF-8 encoding" ?
|               # HTTP1 unfriendly codepoints (00-1f, 7f) must be
|               # encoded with \uXXXX escapes
|
|       h1_blob = "'" base64 "'"
|               # XXX: where to import base64 from ?


Perhaps structure from

Indicating Character Encoding and Language for HTTP Header Field Parameters
https://tools.ietf.org/html/draft-ietf-httpbis-rfc5987bis-03

should also be parseable as common structure ?

That makes:

h1_value  /= <ext-value; defined on [draft-ietf-httpbis-rfc5987bis]>
           ; This MUST NOT be produced expect when relevant
	   ; specification "opt in" syntax, see [draft-ietf-httpbis-rfc5987bis]
	   ; <h1_unicode_string> is preferred instead.

Is this parseable unambiguously?

Anyway common strcture syntax must take account that draft-ietf-httpbis-rfc5987bis-03
syntax is not parsed as some other common structure syntax.

3.2.1.  Definition
https://tools.ietf.org/html/draft-ietf-httpbis-rfc5987bis-03#section-3.2.1

gives

|     ext-value     = charset  "'" [ language ] "'" value-chars
|                   ; like RFC 2231's <extended-initial-value>
|                   ; (see [RFC2231], Section 7)
|
|     charset       = "UTF-8" / mime-charset
|
|     mime-charset  = 1*mime-charsetc
|     mime-charsetc = ALPHA / DIGIT
|                   / "!" / "#" / "$" / "%" / "&"
|                   / "+" / "-" / "^" / "_" / "`"
|                   / "{" / "}" / "~"
|                   ; as <mime-charset> in Section 2.3 of [RFC2978]
|                   ; except that the single quote is not included
|                   ; SHOULD be registered in the IANA charset registry
|
|     language      = <Language-Tag, see [RFC5646], Section 2.1>
|
|     value-chars   = *( pct-encoded / attr-char )
|
|     pct-encoded   = "%" HEXDIG HEXDIG
|                   ; see [RFC3986], Section 2.1
|
|     attr-char     = ALPHA / DIGIT
|                   / "!" / "#" / "$" / "&" / "+" / "-" / "."
|                   / "^" / "_" / "`" / "|" / "~"
|                   ; token except ( "*" / "'" / "%" )

/ Kari Hurtta

Received on Saturday, 15 October 2016 06:45:58 UTC