Notes:
Syntax:
CHAR = <any US-ASCII character (octets 0 - 127)>
CTL = <any US-ASCII control character (octets 0 - 31)
and DEL (127)>
SP = <US-ASCII SP, space (32)>
HT = <US-ASCII HT, horizontal-tab (9)>
token = 1*<any CHAR except CTLs or separators>
separators = "(" | ")" | "<" | ">" | "@"
| "," | ";" | ":" | "\" | <">
| "/" | "[" | "]" | "?" | "="
| "{" | "}" | SP | HT
urisyn::encode, urisyn::decode
http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2
Public Member Functions | |
| http_token () | |
| http_token (const std::string &s) | |
| bool | is_null () const |
| Test if null. | |
| const std::string & | string () const |
| Get string. | |
| const std::string & | encoding () const |
| Encoding, just returns string. | |
Static Public Member Functions | |
| static bool | is_valid (const std::string &v) |
| Test if valid http_token. | |
Static Public Attributes | |
| static const char | ctypes_ [256] |
| valid chars | |
Friends | |
| bool RESTCGI_API | parse (std::string::const_iterator &first, std::string::const_iterator last, http_token &v, bool noskipls) |
| Parse HTTP token. | |
| restcgi::http_token::http_token | ( | ) |
Construct.
| restcgi::http_token::http_token | ( | const std::string & | s | ) |
Construct from string.
| std::invalid_argument | if string contains invalid chars or is empty |
| bool RESTCGI_API parse | ( | std::string::const_iterator & | first, | |
| std::string::const_iterator | last, | |||
| http_token & | v, | |||
| bool | noskipls | |||
| ) | [friend] |
Parse HTTP token.
Returns whether found or not and advances first and sets v if found. Skips leading SP or HT chars unless noskipls is true.
1.4.7