[rt-users] Using https in web interface results sometimes in "Bad Request"

Benno Overeinder benno at NLnetLabs.nl
Thu Jul 16 09:53:09 EDT 2009


On 7/15/09 8:23 PM, Benno Overeinder wrote:
> Hello,
> 
> I recently installed RT 3.8.4 on our FreeBSD server.  And everything
> seems to work correctly.
> 
> Except for some actions in the Web user interface when using https (thus
> using https://rt.example.com).
> 
> <snip/>
>
> Anybody a clue how to solve this?  Again, with editing the URL from http
> to https in the location bar of the web browser seems to work correclty,
> I rather have it corrected in the RT setup.

In reply to my own post, I found out that two other postings to this
email list report the same (or similar) problem.  But unfortunately,
both without any replies or solutions.

- HTTP/HTTPS change on RT 3.8.2 when replying or commenting a ticket, by
Martin Schneider, http://www.gossamer-threads.com/lists/rt/users/81598

- RT 3.8.3 using https calls http URL on ticket update & create, by
James Oliver, http://www.gossamer-threads.com/lists/rt/users/86450


After reading some other postings on redirection and problems with https
and port 80/443, I looked into the Perl file RT/Interface/Web.pm.  The
problem seems the code starting at line 194 in subroutine Redirect (for
RT 3.8.4):

        if ( defined $ENV{HTTPS} and $ENV{'HTTPS'} eq 'on' ) {
            $uri->scheme('https');
        }
        else {
            $uri->scheme('http');
        }

        # [rt3.fsck.com #12716] Apache recommends use of $SERVER_HOST
        $uri->host( $ENV{'SERVER_HOST'} || $ENV{'HTTP_HOST'} );
        $uri->port( $ENV{'SERVER_PORT'} );

The "if" statement here seems to be always false, even if one _does_ use
https.  Checking the value of HTTPS shows it is always undefined
(empty).  Is this a problem with RT and Apache2 interaction?  Should
Apache2 set the HTTPS environment variable?

-- Benno

-- 
Benno J. Overeinder
NLnet Labs
http://www.nlnetlabs.nl/



More information about the rt-users mailing list