php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20906 HTTP_REFERER reports incorrect page
Submitted: 2002-12-09 08:31 UTC Modified: 2002-12-10 02:58 UTC
From: judd at ob-wan dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.2.3 OS: Win2K Server
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: judd at ob-wan dot com
New email:
PHP Version: OS:

 

 [2002-12-09 08:31 UTC] judd at ob-wan dot com
I believe this is related to incorrect flushing of browser reported in 20776.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-09 08:53 UTC] sniper@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

 [2002-12-09 20:45 UTC] judd at ob-wan dot com
OK. Let's take a generic shopping application.

The user comes in at a top index, then clicks an atag to the shopping index. From there he clicks on a category atag (say, fruits) and is presented with Bananas and Blackberries, each of which has an "Add to cart" tag below them. But he also has the choice to click on Bananas itself and see a fuller product description. He does so, and decides to buy (atag to "Add to cart" script) from this level.

A return via HTTP_REFERER from the full description page should return him to the shopping index, but instead it sends him back to the main index.

This seems to be a general problem with browsers not being refreshed when atags are selected. As pointed out in 20776, issuing a meta-refresh fixed a similar problem on a return that wasn't working correctly. You may have already solved this if that bug is closed.
 [2002-12-10 01:31 UTC] chregu@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

You should not rely on HTTP_REFERER for your application logic. HTTP_REFERER is sent by the client/browser and therefore not reliable.

On my system, it does report the correct HTTP_REFERER (as long as the browser sends one..)




 [2002-12-10 02:58 UTC] judd at ob-wan dot com
Yup, this one's definitely bogus. Turned out to be a subtle error in the sample code I'm hacking around.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 23:01:27 2024 UTC