Lines Matching refs:response

7 may legally make another request or fetch the response for a particular
25 | response = getresponse() | ConnectionError
27 Unread-response Idle
31 | response.read() | putrequest()
33 Idle Req-started-unread-response
36 response.read() | | ( putheader() )* endheaders()
38 Request-started Req-sent-unread-response
40 | response.read()
45 -- a second request may not be started until {response-headers-read}
46 -- a response [object] cannot be retrieved until {request-sent}
47 -- there is no differentiation between an unread response body and a
48 partially read response body
52 implies sophisticated clients may accelerate the request/response
57 UNTIL the response headers have been read; this means that further
66 Unread-response _CS_IDLE <response_class>
67 Req-started-unread-response _CS_REQ_STARTED <response_class>
68 Req-sent-unread-response _CS_REQ_SENT <response_class>
249 # If the response includes a content-length header, we need to
268 # from the Status-Line of the response
275 self.length = _UNKNOWN # number of bytes left in response
276 self.will_close = _UNKNOWN # conn will close at end of response
286 # sending a valid response.
288 " response")
313 # we've already started reading the response
316 # read until we get a non-100 response
321 # skip the header from the 100 response
351 # will the connection close at the end of the response?
451 """Read and return the response body, or up to the next amt bytes."""
464 # clip the read to the "end of response"
507 # clip the read to the "end of response"
758 length in response to the FTP retrieval request. A
784 '''Return the HTTP status code that was sent with the response,
920 response = self.response_class(self.sock, method=self._method)
922 (version, code, message) = response._read_status()
928 line = response.fp.readline(_MAXLINE + 1)
940 response.close()
966 response = self.__response
967 if response:
969 response.close()
1097 # if a prior response has been completed, then forget about it.
1105 # 2) a response to a previous request has signalled that it is going
1107 # 3) the headers for the previous response have not been read, thus
1110 # if there is no prior response, then we can request at will.
1113 # response (effectively meaning, "there is no prior response"), and
1116 # Note: if a prior response exists, then we *can* start a new request.
1117 # We are not allowed to begin fetching the response to this new
1118 # request, however, until that prior response is complete.
1127 # Save the method for use later in the response phase
1335 """Get the response from the server.
1341 If a request has not been sent or if a previous response has
1343 response indicates that the connection should be closed, then
1344 it will be closed before the response is returned. When the
1348 # if a prior response has been completed, then forget about it.
1352 # if a prior response exists, then it must be completed (otherwise, we
1353 # cannot read this response's header to determine the connection-close
1356 # note: if a prior response existed, but was connection-close, then the
1357 # socket and response were made independent of this HTTPConnection
1361 # this means the prior response had one of two states:
1363 # response operate independently
1364 # 2) persistent: the response was retained and we await its
1371 response = self.response_class(self.sock, self.debuglevel,
1374 response = self.response_class(self.sock, method=self._method)
1378 response.begin()
1382 assert response.will_close != _UNKNOWN
1385 if response.will_close:
1386 # this effectively passes the connection to the response
1390 self.__response = response
1392 return response
1394 response.close()