Part of twisted.web2 View Source
Function | dashCapitalize | Capitalize a string, making sure to treat - as a word seperator |
Function | casemappingify | Undocumented |
Function | lowerify | Undocumented |
Class | HeaderHandler | HeaderHandler manages header generating and parsing functions. |
Function | parseDateTime | Convert an HTTP date string (one of three formats) to seconds since epoch. |
Class | Token | Undocumented |
Function | tokenize | Tokenize a string according to normal HTTP header parsing rules. |
Function | split | The same as str.split but works on arbitrary sequences. |
Function | filterTokens | Filter out instances of Token, leaving only a list of strings. |
Function | checkSingleToken | Undocumented |
Function | parseKeyValue | Undocumented |
Function | parseArgs | Undocumented |
Function | listParser | Return a function which applies 'fun' to every element in the |
Function | last | Return seq[-1] |
Function | quoteString | Undocumented |
Function | listGenerator | Return a function which applies 'fun' to every element in |
Function | generateList | Undocumented |
Function | singleHeader | Undocumented |
Function | generateKeyValues | Undocumented |
Class | MimeType | No class docstring; 2/6 methods documented |
Function | parseAccept | Undocumented |
Function | parseAcceptQvalue | Undocumented |
Function | addDefaultCharset | Undocumented |
Function | addDefaultEncoding | Undocumented |
Function | parseContentType | Undocumented |
Function | parseContentMD5 | Undocumented |
Function | parseContentRange | Parse a content-range header into (kind, start, end, realLength). |
Function | parseExpect | Undocumented |
Function | parseExpires | Undocumented |
Function | parseIfModifiedSince | Undocumented |
Function | parseIfRange | Undocumented |
Function | parseRange | Undocumented |
Function | parseRetryAfter | Undocumented |
Function | parseWWWAuthenticate | Undocumented |
Function | parseAuthorization | Undocumented |
Function | generateAccept | Undocumented |
Function | removeDefaultEncoding | Undocumented |
Function | generateAcceptQvalue | Undocumented |
Function | parseCacheControl | Undocumented |
Function | generateCacheControl | Undocumented |
Function | generateContentRange | tup is (type, start, end, len) |
Function | generateDateTime | Convert seconds since epoch to HTTP datetime string. |
Function | generateExpect | Undocumented |
Function | generateRange | Undocumented |
Function | generateRetryAfter | Undocumented |
Function | generateContentType | Undocumented |
Function | generateIfRange | Undocumented |
Function | generateWWWAuthenticate | Undocumented |
Function | generateAuthorization | Undocumented |
Class | ETag | Undocumented |
Function | parseStarOrETag | Undocumented |
Function | generateStarOrETag | Undocumented |
Class | Cookie | Undocumented |
Function | parseCookie | Bleargh, the cookie spec sucks. |
Function | generateCookie | Undocumented |
Function | parseSetCookie | Undocumented |
Function | parseSetCookie2 | Undocumented |
Function | makeCookieFromList | Undocumented |
Function | generateSetCookie | Undocumented |
Function | generateSetCookie2 | Undocumented |
Function | parseDepth | Undocumented |
Function | parseOverWrite | Undocumented |
Function | generateOverWrite | Undocumented |
Class | __RecalcNeeded | Undocumented |
Class | Headers | This class stores the HTTP headers as both a parsed representation and |
Tokenize a string according to normal HTTP header parsing rules.
In particular:NOTE: not all headers can be parsed with this function.
Takes a raw header value (list of strings), and Returns a generator of strings and Token class instances.Filter out instances of Token, leaving only a list of strings.
Used instead of a more specific parsing method (e.g. splitting on commas) when only strings are expected, so as to be a little lenient.
Apache does it this way and has some comments about broken clients which forget commas (?), so I'm doing it the same way. It shouldn't hurt anything, in any case.Parse a content-range header into (kind, start, end, realLength).
realLength might be None if real length is not known ('*'). start and end might be None if start,end unspecified (for response code 416)