From:
mah [at] everybody.org (Mark A. Hershberger)
Date:
Fri, 04 Oct 2002 10:35:46 -0500
To:
AxKit Users <axkit-users [at] axkit.org>
Subject:
WebUtils taglib
Is there a reason that the WebUtils taglib looks at the "VIA:"
header rather than $r->hostname first? When the request is
coming from a proxy, it yields incorrect results.
This patch fixes the problem (this against 1.3_90 instead of 1.4):
-- WebUtils.pm 8 Jun 2001 15:50:39 -0000 1.1.1.1
+++ WebUtils.pm 4 Oct 2002 15:29:12 -0000
@@ -60,9 +65,7 @@
}
sub request_host () {
- my $hostname = Apache->header_in('Via');
- $hostname =~ s/^[0-9.]+ //g;
- $hostname =~ s/ .*//g;
+ my $hostname = Apache->request->hostname;
$hostname ||= $ENV{HTTP_HOST};
$hostname ||= Apache->header_in('Host');
return $hostname;
Mark.
--
Find inner peace and ten thousand around you shall be saved.
-- St. Seraphim of Sarov
WebUtils taglib - Mark A. Hershberger on 4 Oct 2002 15:42:03 -0000 Back up to archives |
These pages are copyright © 2002 Apache Software Foundation


Index