Parse a Connection option from ``header`` at the given position. Return the protocol value and the new position. Raises: InvalidHeaderFormat: On invalid inputs.
(
header: str, pos: int, header_name: str
)
| 229 | |
| 230 | |
| 231 | def parse_connection_option( |
| 232 | header: str, pos: int, header_name: str |
| 233 | ) -> tuple[ConnectionOption, int]: |
| 234 | """ |
| 235 | Parse a Connection option from ``header`` at the given position. |
| 236 | |
| 237 | Return the protocol value and the new position. |
| 238 | |
| 239 | Raises: |
| 240 | InvalidHeaderFormat: On invalid inputs. |
| 241 | |
| 242 | """ |
| 243 | item, pos = parse_token(header, pos, header_name) |
| 244 | return cast(ConnectionOption, item), pos |
| 245 | |
| 246 | |
| 247 | def parse_connection(header: str) -> list[ConnectionOption]: |
nothing calls this directly
no test coverage detected
searching dependent graphs…