Fixed absolute hostname redirections for mod_perl proxying.
authorshort <>
Thu, 16 Oct 2003 16:18:05 +0000 (16:18 +0000)
committershort <>
Thu, 16 Oct 2003 16:18:05 +0000 (16:18 +0000)
WebConfig.pm
project/Rel.pl

index bdcb236..d73ecab 100644 (file)
@@ -53,10 +53,9 @@ our %WebConfig=(
                "pserver"=>':pserver:pserver:@cvs.jankratochvil.net',
                "pserver_path"=>"/cvs",
                "resume_url"=>$resume_url,
-               "mailman_url_sub"=>sub () { return "http://www.jankratochvil.net/mailman/"; },
-                                       # { return "http://".$My::Web::W->{"r"}->hostname()."/mailman/"; },
-               "pipermail_url_sub"=>sub () { return "http://www.jankratochvil.net/pipermail/"; },
-                                         # { return "http://".$My::Web::W->{"r"}->hostname()."/pipermail/"; },
+               "web_hostname_sub"=>sub () { return "www.jankratochvil.net"; }, # $My::Web::W->{"r"}->hostname()
+               "mailman_url_sub"  =>sub () { return "http://".&{$My::Web::W->{"web_hostname_sub"}}."/mailman/"; },
+               "pipermail_url_sub"=>sub () { return "http://".&{$My::Web::W->{"web_hostname_sub"}}."/pipermail/"; },
                "heading"=>sub () {
                        print '<table border="0" align="center" style="font-size: larger;">'."\n";
                                print '<col width="20%">'."\n";
index f5feef0..fd39944 100755 (executable)
@@ -66,6 +66,6 @@ for (0..$#projects) {
        }
 
 $W->{"r"}->status(MOVED);
-$W->{"r"}->header_out("Location"=>"http://".$W->{"r"}->hostname()
+$W->{"r"}->header_out("Location"=>"http://".&{$W->{"web_hostname_sub"}}()
 #              .":7680"        # DEBUG
                ."/project/".(!$target ? "" : "$target/"));