attrtext = 1*(any non-ATTRIBUTE_ENDS character plus '%') This is a special parsing routine so that we get a value that includes % escapes as a single string (which we decode as a single string later).
(value)
| 2393 | return attribute, value |
| 2394 | |
| 2395 | def get_extended_attrtext(value): |
| 2396 | """attrtext = 1*(any non-ATTRIBUTE_ENDS character plus '%') |
| 2397 | |
| 2398 | This is a special parsing routine so that we get a value that |
| 2399 | includes % escapes as a single string (which we decode as a single |
| 2400 | string later). |
| 2401 | |
| 2402 | """ |
| 2403 | m = _non_extended_attribute_end_matcher(value) |
| 2404 | if not m: |
| 2405 | raise errors.HeaderParseError( |
| 2406 | "expected extended attrtext but found {!r}".format(value)) |
| 2407 | attrtext = m.group() |
| 2408 | value = value[len(attrtext):] |
| 2409 | attrtext = ValueTerminal(attrtext, 'extended-attrtext') |
| 2410 | _validate_xtext(attrtext) |
| 2411 | return attrtext, value |
| 2412 | |
| 2413 | def get_extended_attribute(value): |
| 2414 | """ [CFWS] 1*extended_attrtext [CFWS] |
no test coverage detected
searching dependent graphs…