MCPcopy Index your code
hub / github.com/python/cpython / parse_headers

Function parse_headers

Lib/http/client.py:251–255  ·  view source on GitHub ↗

Parses only RFC 5322 headers from a file pointer.

(fp, _class=HTTPMessage, *, _max_headers=None)

Source from the content-addressed store, hash-verified

249 return email.parser.Parser(_class=_class).parsestr(hstring)
250
251def parse_headers(fp, _class=HTTPMessage, *, _max_headers=None):
252 """Parses only RFC 5322 headers from a file pointer."""
253
254 headers = _read_headers(fp, _max_headers)
255 return _parse_header_lines(headers, _class)
256
257
258class HTTPResponse(io.BufferedIOBase):

Callers 1

beginMethod · 0.85

Calls 2

_read_headersFunction · 0.85
_parse_header_linesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…