You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2002/06/19 22:58:54 UTC

DO NOT REPLY [Bug 10028] New: - Redirect from HTTP to HTTPS broken for default page

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10028>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10028

Redirect from HTTP to HTTPS broken for default page

           Summary: Redirect from HTTP to HTTPS broken for default page
           Product: Tomcat 4
           Version: 4.1.5
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Connector:Coyote HTTP/1.1
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: jemiller@uchicago.edu


I found what I think is a bug in Tomcat 4.1.5 and Tomcat 4.0.4. I'm running 
Tomcat in standalone mode. I have SSL enabled and I have it setup so that 
requests on the HTTP port are redirected to the HTTPS port.

The bug occurs when I attempt to access my Web site at the following URL.

http://mywebserver:8080

If I access it as,

http://mywebserver:8080/index.jsp

it works fine. i.e. it gets redirected to https://mywebserver:8443/index.jsp.

It also works fine if I access it using https://mywebserver:8443. i.e. using 
HTTPS but not specifying the file name.

So, it seems to have something to do with how it determines the default file 
name.

I have the following in my web.xml file. This works fine with older versions 
of Tomcat.

        <security-constraint>
                <web-resource-collection>
                        <web-resource-name>Tomcat</web-resource-name>
                        <url-pattern>/*</url-pattern>
                </web-resource-collection>
                <user-data-constraint>
                        <transport-guarantee>CONFIDENTIAL</transport-guarantee>
                </user-data-constraint>
        </security-constraint>

This is my server.xml file.

<Server port="8006"
        shutdown="SHUTDOWN"
        debug="99">
        <Service name="Tomcat-Standalone">
                <Connector 
className="org.apache.coyote.tomcat4.CoyoteConnector"
                        port="8080"
                        minProcessors="5"
                        maxProcessors="75"
                        enableLookups="true"
                        redirectPort="8443"
                        acceptCount="10"
                        debug="0"
                        connectionTimeout="20000"/>
                <Connector 
className="org.apache.coyote.tomcat4.CoyoteConnector"
                        port="8443"
                        minProcessors="5"
                        maxProcessors="75"
                        enableLookups="true"
                        acceptCount="10"
                        debug="0"
                        scheme="https"
                        secure="true">
                        <Factory 
className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
                                clientAuth="false"
                                protocol="TLS"/>
                </Connector>
                <Engine name="Standalone"
                        defaultHost="localhost"
                        debug="0">
                        <Logger 
className="org.apache.catalina.logger.FileLogger"
                                prefix="catalina_log."
                                suffix=".txt"
                                timestamp="true"/>
                        <Realm 
className="org.apache.catalina.realm.MemoryRealm"/>
                        <Host name="localhost"
                                debug="0"
                                appBase="webapps"
                                unpackWARs="true">
                                <Valve 
className="org.apache.catalina.valves.AccessLogValve"
                                        directory="logs"
                                        prefix="localhost_access_log."
                                        suffix=".txt"
                                        pattern="common"/>
                                <Logger 
className="org.apache.catalina.logger.FileLogger"
                                        directory="logs"
                                        prefix="localhost_log."
                                        suffix=".txt"
                                        timestamp="true"/>
                                <Context path=""
                                        docBase="ROOT"
                                        debug="0"
                                        reloadable="true"/>
                        </Host>
                </Engine>
        </Service>
</Server>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>