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

Method _read_and_discard_trailer

Lib/http/client.py:561–573  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

559 raise
560
561 def _read_and_discard_trailer(self):
562 # read and discard trailer up to the CRLF terminator
563 ### note: we shouldn't have any trailers!
564 while True:
565 line = self.fp.readline(_MAXLINE + 1)
566 if len(line) > _MAXLINE:
567 raise LineTooLong("trailer line")
568 if not line:
569 # a vanishingly small number of sites EOF without
570 # sending the trailer
571 break
572 if line in (b'\r\n', b'\n', b''):
573 break
574
575 def _get_chunk_left(self):
576 # return self.chunk_left, reading a new chunk if necessary.

Callers 1

_get_chunk_leftMethod · 0.95

Calls 2

LineTooLongClass · 0.85
readlineMethod · 0.45

Tested by

no test coverage detected