Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v diff -u -r1.140.2.26 -r1.140.2.27 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 25 Mar 2016 10:01:26 -0000 1.140.2.26 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 30 Mar 2016 17:04:31 -0000 1.140.2.27 @@ -2553,17 +2553,18 @@ upvar $protoVar proto $hostnameVar hostname $portVar port if { - [regexp {^([a-z]+://)?([^:]+)(:[0-9]*)?$} [ns_conn location] . proto hostname port] - || [regexp {^([a-z]+://)?(\[[^\]]+\])(:[0-9]*)?$} [ns_conn location] . proto hostname port] + [regexp {^([a-z]+://)?([^:]+)(:[0-9]*)?$} $location . proto hostname port] + || [regexp {^([a-z]+://)?(\[[^\]]+\])(:[0-9]*)?$} $location . proto hostname port] } { if {$proto ne ""} { lassign [split $proto :] proto . } - if {$port eq ""} { + if {$port eq "" && $proto ne ""} { set default_port(http) 80 set default_port(https) 443 set port $default_port($proto) } else { + # In case there is no proto, the port is set to "" set port [string range $port 1 end] } set success 1