#799 [NEW]: HTTP::Header ignore query params
| From: | shockflash at web dot de | Date: | Thu, 19 Feb 2004 16:13:00 +0000 |
| Subject: | #799 [NEW]: HTTP::Header ignore query params | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-25723@lists.php.net to get a copy of this message | ||
From: shockflash at web dot de
Operating system: SuSE Linux 9.0
PHP version: 4.3.4
PHP Bug Type: Bug System
Bug description: HTTP::Header ignore query params
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
)
--
Edit bug report at http://pear.php.net/bugs/bug.php?id=799&edit=1
--