Using Tc 6.0.26, Java 6 on Win XP Pro.

 

I am trying to develop a valve to modify requests based on a HTTP request
header as set by our SSL terminating load balancer. The valve is to watch
out for a particular header and when found, call the setSecure(true),
setScheme("https") and setServerPort(443) methods so that the receiving
servlet is aware that the request is a secure one. The setSecure() &
setServerPort() methods work as expected, but the setScheme() method does
not set the scheme. I have looked into the source for
catalina.connector.Request and have found the setScheme() method is made of
a single line: "// Not used". This would explain why the setScheme() method
is not setting the scheme as I expect it would.

 

So, how else could I set the scheme of the request to 'https'? There must be
a way, because the http connector is able to set it if I use the 'scheme'
attribute in the connectors XML config in server.xml. I have tried to find
the code which does this, but have not been able to find it.

 

Any help is ppreciated.

 

Cheers,

Matt.

Reply via email to