[Catalyst] unexpected behavior of $c->request->secure and $c->request->base

Tomas Doran bobtfish at bobtfish.net
Fri Apr 24 21:22:32 GMT 2009


On 24 Apr 2009, at 22:10, seasprocket at gmail.com wrote:

> The expected behavior (for me) is that secure() returns true if the  
> connection is secured via SSL.
>
> Looking at Engine::CGI, it appears that it only returns true if $ENV 
> {HTTPS} eq 'ON'  or if you're on Port 443.
>
> Furthermore, if secure fails because you're on a non-standard port  
> and HTTPS is not set, then base returns the wrong base (http  
> instead of https).
>
> I am just really confused or is this desired behavior?

Neither of the above.

It's a bit too simple.

Please illustrate your use case and how the current behavior doesn't  
work for you, so we can work out what to do to instead / as well.

Cheers
t0m




More information about the Catalyst mailing list