[drupal-devel] [bug] Improved internal/external referrer differentiation

Robin Monks drupal-devel at drupal.org
Mon Jun 20 11:59:45 UTC 2005


Issue status update for http://drupal.org/node/9508

 Project:      Drupal
 Version:      cvs
 Component:    statistics.module
 Category:     bug reports
 Priority:     normal
 Assigned to:  Robin Monks
 Reported by:  njivy
 Updated by:   Robin Monks
 Status:       patch
 Attachment:   http://drupal.org/files/issues/parse_url.diff (1.7 KB)

Here is a patch using parse_url.


Robin




Robin Monks



Previous comments:
------------------------------------------------------------------------

July 25, 2004 - 17:32 : njivy

Attachment: http://drupal.org/files/issues/statistics.http_host.patch (2.34 KB)

Some PHP setups return $_SERVER['HTTP_HOST'] with a port designation --
e.g. http://domain.tld:80.  With this patch, statistics.module removes
the port designation before distinguishing between internal and
external referrers.  Without this patch, all referrers will be labeled
as external in PHP setups where the port designation is included in
HTTP_HOST.




------------------------------------------------------------------------

July 25, 2004 - 18:43 : Anonymous

I have provided a patch before which also enabled stats module to treat
more domain names as local ones, since a site might be accessible via
multiple domain names (like www.drupal.org and drupal.org). That was
not accepted. It is not just port numbers that are problems.




------------------------------------------------------------------------

October 10, 2004 - 18:24 : killes at www.drop.org

Doesn't apply anymore-




------------------------------------------------------------------------

June 13, 2005 - 23:22 : Robin Monks

Attachment: http://drupal.org/files/issues/incorrect.external.fix.patch (1.73 KB)

Updated patch to work with latest HEAD.


Tested to work with CVS HEAD.


I'll take over any further problems that this patch may incur.


Robin




------------------------------------------------------------------------

June 19, 2005 - 20:28 : Dries

Not sure but it might be shorter/better to use PHP's parse_url()?







More information about the drupal-devel mailing list