[Catalyst] Post-login redirection problem

Bill Moseley moseley at hank.org
Wed May 14 18:51:50 BST 2008


On Wed, May 14, 2008 at 08:29:00AM -0700, Dr. Jennifer Nussbaum wrote:
> Hi,
> 
> I just upgraded some packages on my server, including some versions
> of Catalyst.  Now Im getting problems after i log in a user. Im
> using the RequireSSL plugin, but now, after a user logs in
> successfully, instead of going to http://www.mysite.com/myapp/, it
> goes to
> http://www.mysite.com:443/myapp/user/http://www.mysite.com/myapp.
> And then I get the message "Bad Request...your speaking plain HTTP
> to an SSL-enabled server port. Instead use the HTTPS scheme to
> access this URL, please."

Sure you didn't end up down-grading Catalyst::Engine::Apache?

At one point it only would remove port 80 but in recent versions it
removes both 80 and 443:

   if ( $port !~ /^(?:80|443)$/ && $host !~ /:/ ) {
        $host .= ":$port";
    }

The old version would have left the 443 on the url.

My version has this, but I think I added that to my copy of 1.11

    unless ( $host =~ /:/ ) {
        $host .= ":$port"
            if ( $c->req->secure && $port != 443 )
            || ( !$c->req->secure && $port != 80 )
    }


Hum, I see I have a hacked version of RequireSSL that creates a URI
object and then sets:

    $uri->scheme( $scheme );
    $uri->port( undef );

if I don't have a secure and non-secure host setup in my config (i.e.
my host name is same for ssl and non-ssl).




-- 
Bill Moseley
moseley at hank.org




More information about the Catalyst mailing list