PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

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() !