Parse a subprotocol from ``header`` at the given position. Return the subprotocol value and the new position. Raises: InvalidHeaderFormat: On invalid inputs.
(
header: str, pos: int, header_name: str
)
| 424 | |
| 425 | |
| 426 | def parse_subprotocol_item( |
| 427 | header: str, pos: int, header_name: str |
| 428 | ) -> tuple[Subprotocol, int]: |
| 429 | """ |
| 430 | Parse a subprotocol from ``header`` at the given position. |
| 431 | |
| 432 | Return the subprotocol value and the new position. |
| 433 | |
| 434 | Raises: |
| 435 | InvalidHeaderFormat: On invalid inputs. |
| 436 | |
| 437 | """ |
| 438 | item, pos = parse_token(header, pos, header_name) |
| 439 | return cast(Subprotocol, item), pos |
| 440 | |
| 441 | |
| 442 | def parse_subprotocol(header: str) -> list[Subprotocol]: |
nothing calls this directly
no test coverage detected
searching dependent graphs…