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

Method _read_next_chunk_size

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

Source from the content-addressed store, hash-verified

543 return n
544
545 def _read_next_chunk_size(self):
546 # Read the next chunk size from the file
547 line = self.fp.readline(_MAXLINE + 1)
548 if len(line) > _MAXLINE:
549 raise LineTooLong("chunk size")
550 i = line.find(b";")
551 if i >= 0:
552 line = line[:i] # strip chunk-extensions
553 try:
554 return int(line, 16)
555 except ValueError:
556 # close the connection as protocol synchronisation is
557 # probably lost
558 self._close_conn()
559 raise
560
561 def _read_and_discard_trailer(self):
562 # read and discard trailer up to the CRLF terminator

Callers 1

_get_chunk_leftMethod · 0.95

Calls 4

_close_connMethod · 0.95
LineTooLongClass · 0.85
readlineMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected