Lines Matching defs:read

28     [Response-headers-read]
31 | response.read() | putrequest()
36 response.read() | | ( putheader() )* endheaders()
40 | response.read()
45 -- a second request may not be started until {response-headers-read}
48 partially read response body
57 UNTIL the response headers have been read; this means that further
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
250 # make sure that the client doesn't read more than the
253 # happen if a self.fp.read() is done (without a size) whether
254 # self.fp is buffered or not. So, no self.fp.read() by
274 self.chunk_left = _UNKNOWN # bytes left to read in current chunk
316 # read until we get a non-100 response
444 # read up to the last byte, but NOT past it.
450 def read(self, amt=None):
464 # clip the read to the "end of response"
466 s = self.fp.read(amt)
477 # Amount is not given (unbounded read) so we must check self.length
479 s = self.fp.read()
487 self._close_conn() # we read everything
492 of bytes read.
507 # clip the read to the "end of response"
541 # read and discard trailer up to the CRLF terminator
557 # chunk_left == None: No current chunk, should read next.
559 # been read.
572 # we read everything; close the "file"
631 data = self.fp.read(amt)
662 # Having this enables IOBase.readline() to read more than one
674 # Fallback to IOBase readline which uses peek() and read()
686 # Strictly speaking, _get_chunk_left() may cause more than one read,
693 read = self.fp.read1(n)
694 self.chunk_left -= len(read)
695 if not read:
697 return read
700 # Strictly speaking, _get_chunk_left() may cause more than one read,
822 if hasattr(body, 'read'):
974 file-like object that supports a .read() method, or an iterable object.
985 if hasattr(data, "read") :
992 datablock = data.read(self.blocksize)
1025 datablock = readable.read(self.blocksize)
1046 if hasattr(message_body, 'read'):
1107 # 3) the headers for the previous response have not been read, thus
1353 # cannot read this response's header to determine the connection-close
1495 return '%s(%i bytes read%s)' % (self.__class__.__name__,