} $this->
_checkSocketReadTimeout();
$statusCode = Zend_Http_Response::
extractCode($response);
// Handle 100 and 101 responses internally by restarting the read again
if ($statusCode == 100 ||
$statusCode == 101
) return $this->
read();
// Check headers to see what kind of connection / transfer encoding we have
$headers = Zend_Http_Response::
extractHeaders($response);
/**
* Responses to HEAD requests and 204 or 304 responses are not expected
* to have a body - stop reading here
*/
if ($statusCode == 304 ||
$statusCode == 204 ||
$this->method == Zend_Http_Client::HEAD
) { // Close the connection if requested to do so by the server
if (isset($headers['connection'
]) &&
$headers['connection'
] == 'close'
) { $this->
close();
}