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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to