PEAR is archived and read-only

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

Home » HTTP » HTTP » Bug #799

HTTP::Header ignore query params

Details

Submitted2004-02-19 16:13 UTC
Fromshockflash at web dot de
Assignedpajoye
StatusClosed
PackageHTTP
PHP Version4.3.4
OSSuSE Linux 9.0
Roadmaps(Not assigned)

Comments

[2004-02-19 16:13 UTC] shockflash at web dot de

Description:
------------
If I call a HTTP::head with a URL that looks like
http://www.giata-imagecluster-5.de/kat/showimage.php?vea=ifl&size=800&cid=100013&file=image_396378_030811115148859.jpg
the system missed the query part of the url (everything behind the "?")

I didn't see why it do this. He splits the url the correct way.
If i manually change the code of the function that he used
also the query, everything works fine.

The GIATA Part of the Header is created by the showimage.php script. If the lokal file was found, the script will write the size of the image, if not found or no params are get, the result is "None". Here, the image exists, but the result is "None".

Same URL with mod_gzips Testpage:

http://www.schroepl.net/cgi-bin/http_trace.pl?url=http%3A%2F%2Fwww.giata-imagecluster-5.de%2Fkat%2Fshowimage.php%3Fvea%3Difl%26size%3D320%26cid%3D100013%26file%3Difl380522_030626164316812.jpg&method=HEAD&version=HTTP%2F1.0

It works here!

Reproduce code:
---------------
$URL = 'http://www.giata-imagecluster-5.de/kat/showimage.php?vea=ifl&size=800&cid=100013&file=image_396378_030811115148859.jpg';
$result = HTTP::head(trim($URL));
echo("<pre>"); print_r($result); echo("<//pre>");

Expected result:
----------------
[ 15] HTTP/1.0 200 OK
[ 17] Connection: close
[ 35] Date: Thu, 19 Feb 2004 15:07:53 GMT
[ 58] Server: Apache/1.3.27 (Linux/SuSE) PHP/4.3.1 mod_perl/1.27
[ 24] Content-Type: image/jpeg
[ 18] GIATA: Picture=320
[ 23] X-Powered-By: PHP/4.3.1

Actual result:
--------------
Array
(
[response_code] => 200
[response] => HTTP/1.1 200 OK
[Date] => Thu, 19 Feb 2004 15:40:36 GMT
[Server] => Apache/1.3.27 (Linux/SuSE) PHP/4.3.1 mod_perl/1.27
[X-Powered-By] => PHP/4.3.1
[GIATA] => None
[Connection] => close
[Content-Type] => image/jpeg
)