Break apart an HTTP header string that is potentially a quoted, comma separated list as used in entity headers in RFC2616.
(header_str)
| 431 | return first_byte_pos, last_byte_pos |
| 432 | |
| 433 | def parse_multi_value_header(header_str): |
| 434 | """Break apart an HTTP header string that is potentially a quoted, comma separated list as used in entity headers in RFC2616.""" |
| 435 | parsed_parts = [] |
| 436 | if header_str: |
| 437 | parts = header_str.split(',') |
| 438 | for part in parts: |
| 439 | match = re.search('\s*(W/)?\"?([^"]*)\"?\s*', part) |
| 440 | if match is not None: |
| 441 | parsed_parts.append(match.group(2)) |
| 442 | return parsed_parts |
| 443 | |
| 444 | |
| 445 | def next_stale_after_value(stale_after): |
no outgoing calls
searching dependent graphs…