PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTTP » HTTP_Client » Bug #6938

Error in 'Location' header analysis

Details

Submitted2006-02-26 05:12 UTC
Fromubit at mail dot ru
Assignedavb
StatusClosed
PackageHTTP_Client
PHP Version4.4.2
OSUnix, Windows
Roadmaps(Not assigned)

Comments

[2006-02-26 05:12 UTC] ubit at mail dot ru

Description:
------------
Error in function _performRequest(&$request) in line:

$location = $request->getResponseHeader('Location');

Correct version:

$location = $request->getResponseHeader('location');

because of some web-sites generate headers in lowercase and in HTTP_Request class all incoming headers are in lowercase by default

Test script:
---------------
Try to get next page with HTTP_Client class:

<?
header('location: http://www.yahoo.com');
exit;
?>

There is no 'Location' header in $request->getResponseHeader() !