[Rt-devel] Problem with redirect

Nico -telmich- Schottelius nico-rt-devel at schottelius.org
Tue Mar 27 06:50:37 EDT 2007


Hello!

We are using rt in FreeBSD with Jails:

   External_IPN->Apache2.2 (mod_proxy)->
   Jail_IPN->Apache2.2. (in jail)

The external url is https://test.company.com/rt/,
the internal url is http://10.0.0.2/. With the current
implementation of lib/RT/Interface/Web.pm the redirect is
broken.

I use the following diff to get it working, disabling the
'intelligent' behaviour of rt:

rt23# pwd      
/usr/local/rt3/lib/RT/Interface
rt23# diff -u Web.pm-3.6.3.orig Web.pm
--- Web.pm-3.6.3.orig   Tue Mar 27 10:17:28 2007
+++ Web.pm      Tue Mar 27 10:18:13 2007
@@ -191,11 +191,13 @@
     # If the user is coming in via a non-canonical
     # hostname, don't redirect them to the canonical host,
     # it will just upset them (and invalidate their credentials)
-    if ($uri->host  eq $server_uri->host && 
-        $uri->port eq $server_uri->port) {
-            $uri->host($ENV{'HTTP_HOST'});
-            $uri->port($ENV{'SERVER_PORT'});
-        }
+
+# FIX the redirect
+    #if ($uri->host  eq $server_uri->host && 
+#        $uri->port eq $server_uri->port) {
+#            $uri->host($ENV{'HTTP_HOST'});
+#            $uri->port($ENV{'SERVER_PORT'});
+#        }
 
     $HTML::Mason::Commands::m->redirect($uri->canonical);
     $HTML::Mason::Commands::m->abort;


I don't really know, in which situation you would like to replace
the values with the environment with what was really requested.

Don't know, perhaps this block can be removed anyway or is there another
fix needed for another situation?

Greetings,

Nico

-- 
Think about Free and Open Source Software (FOSS).
http://nico.schottelius.org/documentations/foss/the-term-foss/

PGP: BFE4 C736 ABE5 406F 8F42  F7CF B8BE F92A 9885 188C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bestpractical.com/pipermail/rt-devel/attachments/20070327/65001bec/attachment.pgp


More information about the Rt-devel mailing list