The expected behavior (for me) is that secure() returns true if the connection is secured via SSL.<br><br>Looking at Engine::CGI, it appears that it only returns true if $ENV{HTTPS} eq &#39;ON&#39;  or if you&#39;re on Port 443.<br>

<br>Furthermore, if secure fails because you&#39;re on a non-standard port and HTTPS is not set, then base returns the wrong base (http instead of https). <br><br>I am just really confused or is this desired behavior?<br>