PHP 4.0 Bug #9699 Updated: URL with anchor reference parsing error

From: Date: Fri, 16 Mar 2001 22:26:49 +0000
Subject: PHP 4.0 Bug #9699 Updated: URL with anchor reference parsing error
Groups: php.dev 
Request: Send a blank email to php-dev+get-49151@lists.php.net to get a copy of this message
ID: 9699 Updated by: sniper Reported By: muffle@immortalcurse.com Old-Status: Open Status: Closed Bug Type: HTTP related Assigned To: Comments: Can't reproduce. Try latest CVS build from http://www.php4win.de/ --Jani Previous Comments: --------------------------------------------------------------------------- [2001-03-12 06:12:15] muffle@immortalcurse.com This bug affects how variables are parsed from the URL, in instances when the header() function is used to forward the browser. Eg. if the following code was used in a script: header("Location: index.php?variable=blah") Then index.php would be parsed and PHP would assign $variable == blah. However, if the user adds a HTML anchor reference onto the end, eg: header("Location: index.php?variable=blah#1") Then the web browser would still parse it fine, but PHP will assign $variable == blah#1. If the user refreshes the browser window (eg., the location header isn't being used to laod the script) then it works fine, so this bug is limtied to the header() function only. Fix: The script writer can add an & before the # character in the URL, eg: index.html?variable=blah&#1 --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9699&edit=2

« previous php.dev (#49151) next »