With Zend_Http_Client incubator version,
When a redirect response to another host is returned,
the _prepare_headers method doesn't set the new host name,
so the redirect action doesn't work rightly.
// Set the host header
if (! isset($this->headers['host'])) {
$host = $this->uri->getHost() . ($this->uri->getPort() == 80 ? '' : ':' . $this->uri->getPort());
$this->setHeader('host', $host);
}
will be fixed to
// Set the host header
$host = $this->uri->getHost() . ($this->uri->getPort() == 80 ? '' : ':' . $this->uri->getPort());
$this->setHeader('host', $host);
Please check it.
I didn't use the patch you proposed because I want to give people the option to override the "Host" header if they want to by setting it before the request. Instead, I changed the Zend_Http_Client::request() code to unset the "Host" header when redirecting to a valid URI.
Let me know if the problem is solved or not.