Bases: object
Find parameters in Accept header for given content type.
Bases: URLMap
Parse lists as described by RFC 2068 Section 2.
In particular, parse comma-separated lists where the elements of the list may include quoted-strings. A quoted-string could contain a comma. A non-quoted string could have quotes in the middle. Quotes are removed automatically after parsing.
The return value is a standard list
:
>>> parse_list_header('token, "quoted value"')
['token', 'quoted value']
value – a string with a list header.
list
Parse ‘Content-Type’-like header into a tuple.
Parse a Content-Type
like header into a tuple with the content
type and the options:
>>> parse_options_header('Content-Type: text/html; mimetype=text/html')
('Content-Type:', {'mimetype': 'text/html'})
value – the header to parse.
(str, options)
Unquotes a header value.
This does not use the real unquoting but what browsers are actually using for quoting.
value – the header value to unquote.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.