Index: openacs-4/packages/acs-tcl/tcl/security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/security-procs.tcl,v diff -u -N -r1.126.2.58 -r1.126.2.59 --- openacs-4/packages/acs-tcl/tcl/security-procs.tcl 17 Jan 2022 09:31:26 -0000 1.126.2.58 +++ openacs-4/packages/acs-tcl/tcl/security-procs.tcl 17 Jan 2022 10:28:45 -0000 1.126.2.59 @@ -2504,8 +2504,14 @@ # but not for receiving. # if {[dict get $d port] != 0} { + # + # Add configured locations (deprecated, since this + # conflicts with the concept of virutal servers). + # set location [dict get $d location] - if {$location ni $locations} {lappend locations $location} + if {$location ne "" && $location ni $locations} { + lappend locations $location + } set hosts [dict get $d host] if {[acs::icanuse "ns_set values"]} { @@ -2516,13 +2522,33 @@ } } foreach host $hosts { - set location [dict get $d proto]://$host + set proto [dict get $d proto] + set port [dict get $d port] + # + # Add always a variant with the omitted default port. + # + if {($proto eq "https" && $port eq "443") + || ($proto eq "http" && $port eq "80") + } { + set location ${proto}://$host + if {$location ni $locations} { + lappend locations $location + } + } + # + # Add a variant with the omitted port to + # portless_locations. + # + set location ${proto}://$host if {$location ni $portless_locations && $location ni $locations } { lappend portless_locations $location } - append location :[dict get $d port] + # + # Add always a variant with the port to locations. + # + append location :$port if {$location ni $locations} { lappend locations $location }