[−][src]Function actix_web::http::header::parse_extended_value
pub fn parse_extended_value(val: &str) -> Result<ExtendedValue, ParseError>
Parses extended header parameter values (ext-value
), as defined in
RFC 5987.
Extended values are denoted by parameter names that end with *
.
ABNF
ext-value = charset "'" [ language ] "'" value-chars
; like RFC 2231's <extended-initial-value>
; (see [RFC2231], Section 7)
charset = "UTF-8" / "ISO-8859-1" / 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, defined in [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 ( "*" / "'" / "%" )