MCPcopy Index your code
hub / github.com/RustPython/RustPython / _read_next_chunk_size

Method _read_next_chunk_size

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

Source from the content-addressed store, hash-verified

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

Callers 1

_get_chunk_leftMethod · 0.95

Calls 5

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

Tested by

no test coverage detected