Lines Matching refs:bytes
227 email Parser wants to see strings rather than bytes.
228 But a TextIOWrapper around self.rfile would buffer too many bytes
229 from the stream, bytes which we later need to read as bytes.
230 So we read the correct bytes here, as bytes, for email Parser
243 # The bytes from the socket object are iso-8859-1 strings.
251 # specified number of bytes. If it does, it will block until
274 self.chunk_left = _UNKNOWN # bytes left to read in current chunk
275 self.length = _UNKNOWN # number of bytes left in response
451 """Read and return the response body, or up to the next amt bytes."""
491 """Read up to len(b) bytes into bytearray b and return the number
492 of bytes read.
511 # connection, and the user is reading more bytes than will be provided
622 raise IncompleteRead(bytes(b[0:total_bytes]))
625 """Read the number of bytes requested.
627 This function should be used when <amt> bytes "should" be present for
628 reading. If the bytes are truly not available (due to EOF), then the
641 raise IncompleteRead(bytes(b[:n]), amt-n)
812 any method if the body is a str or bytes-like object and not a file.
827 # does it implement the buffer protocol (bytes, bytearray, array)?
973 ``data`` can be a string object, a bytes object, an array object, a
1008 raise TypeError("data should be a bytes-like object "
1062 raise TypeError("message_body should be a bytes-like "
1303 # 2. the body is a file or iterable, but not a str or bytes-like
1495 return '%s(%i bytes read%s)' % (self.__class__.__name__,
1520 HTTPException.__init__(self, "got more than %d bytes when reading %s"