MCPcopy Index your code
hub / github.com/python-websockets/websockets / parse_connection

Function parse_connection

src/websockets/headers.py:247–260  ·  view source on GitHub ↗

Parse a ``Connection`` header. Return a list of HTTP connection options. Args header: value of the ``Connection`` header. Raises: InvalidHeaderFormat: On invalid inputs.

(header: str)

Source from the content-addressed store, hash-verified

245
246
247def parse_connection(header: str) -> list[ConnectionOption]:
248 """
249 Parse a ``Connection`` header.
250
251 Return a list of HTTP connection options.
252
253 Args
254 header: value of the ``Connection`` header.
255
256 Raises:
257 InvalidHeaderFormat: On invalid inputs.
258
259 """
260 return parse_list(parse_connection_option, header, 0, "Connection")
261
262
263_protocol_re = re.compile(

Callers 6

process_responseMethod · 0.85
process_requestMethod · 0.85
check_requestFunction · 0.85
check_responseFunction · 0.85
test_parse_connectionMethod · 0.85

Calls 1

parse_listFunction · 0.85

Used in the wild real call sites across dependent graphs

searching dependent graphs…