Bug 32781 - attribute scheme not being recognized
Summary: attribute scheme not being recognized
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Connector:Coyote (show other bugs)
Version: 5.5.4
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
: 33970 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-12-20 18:30 UTC by Eric Abbott
Modified: 2005-11-25 11:11 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Abbott 2004-12-20 18:30:45 UTC
The scheme attribute for the default CoyoteConnector (which i believe is
org.apache.coyote.tomcat4.CoyoteConnector) is not being recognized right away.
Right away sounds ambiguous, and it is annoying.  But right after starting
the server, the scheme will be returned (request.getScheme()) will be returned
as http instead of https.

For example, with a connector like
    <Connector port="80"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="443" acceptCount="100"
               debug="0" connectionTimeout="20000"
               scheme="https" secure="false"
               disableUploadTimeout="true" />

Immediately after starting tomcat running a jsp such as:
<html><head></head><body>
getScheme=<%= request.getScheme() %>
</body></html>

gives the result of:
<html><head></head><body>
getScheme=http
</body></html>

That all is very reproducable.  The ambiguousness comes in later.  After letting
the server run for awhile, it'll start returning https as expected.  I have no
concrete data on "awhile".

I have run into this problem with tomcat:
 4.1.31 on AIX and Linux.
 5.0.25 on AIX
 5.5.4 on Linux

The tomcat-users list did not bite on this problem after I posted it last week,
and I can't seem to find any reference to it in bugzilla.

Please contact me if you have any questions or are having difficulty reproducing.

Thanks,

Eric
Comment 1 Remy Maucherat 2005-01-06 01:47:29 UTC
This is now fixed in CVS.
Comment 2 Mark Thomas 2005-04-14 19:44:36 UTC
*** Bug 33970 has been marked as a duplicate of this bug. ***
Comment 3 Robin West 2005-11-25 20:01:23 UTC
I'm working on an application which is affected by bug 32781 (scheme is 
reported as http instead of https) and was hoping that version 5.0.28 or 5.0.30 
would fix this, but it is still present. According to the comments on Bug 
33970, this fix was backported to 5.0. Will it be included in 5.0.30? I would 
prefer not to go to 5.5 yet as the java upgrade would be a major setback.

Comment 4 Peter Rossbach 2005-11-25 20:11:33 UTC
You can use JDK 1.4 with tomcat 5.5. 
What you need is also download and extract the compat package.

Have you test the tomcat 5.0 svn head?