Home » HTTP » HTTP_Client » Bug #6938
Error in 'Location' header analysis
Details
| Submitted | 2006-02-26 05:12 UTC |
|---|---|
| From | ubit at mail dot ru |
| Assigned | avb |
| Status | Closed |
| Package | HTTP_Client |
| PHP Version | 4.4.2 |
| OS | Unix, 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() !