Reply: PHP 4.0 Bug #8249 Updated: getallheaders only can get URL of the last
| From: | erwinba at 163 dot net | Date: | Tue, 19 Dec 2000 07:05:51 +0000 |
| Subject: | Reply: PHP 4.0 Bug #8249 Updated: getallheaders only can get URL of the last | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-41825@lists.php.net to get a copy of this message | ||
My program is here :
<?
if (isset($filename)) {
$headers = getallheaders();
$referer = $headers['Referer']
echo "referer=$referer<br>\n";
}
echo "<a href='$PHP_SELF?filename=good.txt'>good.txt</a>\n";
echo "<a href='$PHP_SELF?filename=bad.txt'>bad.txt</a>\n";
?>
OK, we execute it in IE 5.0,the first, i input 'http://xqee/test.php'
as the IE address, the output is :
good.txt bad.txt
Then I click the good.txt, the IE address become as:
'http://xqee/test.php?filename=good.txt'
and the output like this:
referer=http://xqee/test.php
good.txt bad.txt
The last, I click the bad.txt, the IE address become as:
'http://xqee/test.php?filename=bad.txt'
and the output like this:
referer=http://xqee/test.php?filename=good.txt
good.txt bad.txt
I wish it can return current referer, such as the last return:
referer=http://xqee/test.php?filename=bad.txt
And I wish it is not like the really result :
referer=http://xqee/test.php?filename=good.txt
Previous Comments:
---------------------------------------------------------------------------
ID: 8249
Updated by: stas
Reported By: erwinba@163.net
Old-Status: Open
Status: Feedback
Bug Type: Apache related
Assigned To:
Comments:
Could you please explain more clearly what did you do, what
you expected and what was returned?
Previous Comments:
---------------------------------------------------------------------------
[2000-12-14 04:02:27] erwinba@163.net
The "getallheaders" function cannot get the current URL
list, it get the last access 'Referer' only.
such as, access the test.php page by
http://myserver/php/test.php?parameter=value
then access the process.php page by
http://myserver/php/process.php?page=value
on my process.php page, I use getallheaders() function,
but this 'Referer' is returned : test.php?parameter=value.
Of course, I want the current Referer is returned.
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=8249
===============================================
ΪÄã¶ø½¨£¬ÎªÄã¶øÉ裬ÈÃÄã´«µÝÕæÐÄÕæÒâ
---- 163.netºØ¿¨Õ¾£¨http://ecard.163.net£©
163µç×ÓÓʾÖȫзîÏ×£¬¾«²ÊÎÞÏ޵ĵç×Ӻؿ¨Õ¾¡£
===============================================