Here's a patch that appears to fix the problem.
<p>
I added a routine called "ad_proc" that will return the port portion of the request (including the leading ":") and then modified the second case
in "rp_filter".
<pre>
--- openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl Thu Oct 18 14:49:45 2001
+++ openacs4/packages/acs-tcl/tcl/request-processor-procs.tcl Wed Nov 7 17:50:19 2001
@@ -5,7 +5,7 @@
@author Jon Salz (
mailto:jsalz@arsdigita.com)
@date 15 May 2000
- @cvs-id $Id: request-processor-procs.tcl,v 1.6 2001/10/18 21:49:45 donb Exp $
+ @cvs-id $Id: request-processor-procs.tcl,v 1.1.1.1 2001/10/30 06:06:55 nsadmin Exp $
}
#####
@@ -367,10 +367,10 @@
}
if {[ad_secure_conn_p]} {
# it's a secure connection.
- ad_returnredirect
https://[ad_host]$url
+ ad_returnredirect
https://[ad_host][ad_port]$url
return "filter_return"
} else {
- ad_returnredirect
http://[ad_host]$url
+ ad_returnredirect
http://[ad_host][ad_port]$url
return "filter_return"
}
}
@@ -1024,6 +1024,18 @@
return $host
} else {
return "unknown host"
+ }
+}
+
+ad_proc ad_port {} {
+ Returns the port as it was typed in the browser,
+ provided forcehostp is set to 0.
+} {
+ set host_and_port [ns_set iget [ns_conn headers] Host]
+ if { [regexp {^([^:]+):([0-9]+)} $host_and_port match host port] } {
+ return ":$port"
+ } else {
+ return ""
}
}
</pre>