Issues

ZF-10934: HTTP-Client discards selected request method when following redirects.

Description

To reproduce the error, use the HTTP Client to do a HEAD request to a url that contains a Header-Location redirect.

The HTTP Client then follows the redirects until the maximum redirect count is reached, but sets all variables according to the new url, included the method hardcoded to GET (not to HEAD).

$m = $this->method;
$this->resetParameters(); $this->setMethod($m);

instead of

$this->setMethod(self::GET);

fixes the problem.

Additionally, if the file at the source is too big, so that an error occours, it is not displayed when doing a HEAD request that gets converted to GET. The client script just terminates with no error or message, even with maximum error reporting and display errors.

Comments

No comments to display