Subject: | request_host broken behind a proxy |
When accessing an AxKit hosted page from behind a proxy, the request_host sub returns the wrong data. (http://PROXY/ instead of http://mysitename/)
I found the patch a while back from Mark A. Hershberger (Fri, 04 Oct 2002 10:35:46 -0500) and used it to patch the 1.4 version.
Attached is a patch for the 1.6 version.
-=Chris
--- WebUtils.pm.orig Fri Aug 1 15:02:11 2003
+++ WebUtils.pm Fri Aug 1 15:06:07 2003
@@ -78,9 +78,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;