Index: openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 18 Oct 2001 21:49:45 -0000 1.6 +++ openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 20 Nov 2001 21:49:52 -0000 1.7 @@ -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" } } @@ -1027,6 +1027,18 @@ } } +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 "" + } +} + ad_proc root_of_host {host} { Maps a hostname to the corresponding sub-directory. } {