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.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | parse_url.diff | 1.7 KB | robin monks |
| #3 | incorrect.external.fix.patch | 1.73 KB | robin monks |
| statistics.http_host.patch | 2.34 KB | njivy |
Comments
Comment #1
(not verified) commentedI 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.
Comment #2
killes@www.drop.org commentedDoesn't apply anymore-
Comment #3
robin monks commentedUpdated 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
Comment #4
dries commentedNot sure but it might be shorter/better to use PHP's
parse_url()?Comment #5
robin monks commentedHere is a patch using parse_url.
Robin
Comment #6
robin monks commentedA newer incarnaton of this code now rests with http://drupal.org/node/27787.
If that patch does not go though, this bug will be reopened and updated. Otherwise....duplicate.
Robin