empty file from tomcat https redirect?
Posted
by amertune
on Server Fault
See other posts from Server Fault
or by amertune
Published on 2010-04-09T21:36:50Z
Indexed on
2010/04/09
21:43 UTC
Read the original article
Hit count: 235
I am using tomcat 6.0.20, with jdk 1.6.0_18 on 64 bit linux (tomcat downloaded from tomcat.apache.org, not installed from repositories).
I have iptables redirects from port 80 -> 8080 and 443 -> 8443. In server.xml, the connector for port 8080 redirects to 443, and the 8443 connector has proxyPort="443".
In conf/web.xml, I have added this bit at the end of the file (but still inside the <web-app></webapp> tags).
<security-constraint>
<web-resource-collection>
<web-resource-name>Protected Context</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
I also have two contexts, ROOT and mywebapp. If I go to http://myurl.com
, then I get redirected to https://myurl.com
. If I go to http://myurl.com/mywebapp/
, then I get redirected to https://myurl.com/mywebapp/
. The problem I'm having is when I go to http://myurl.com/mywebapp
(no trailing slash). When I do this I get a prompt to download an empty file that has an empty name. Going to https://myurl.com/mywebapp
works.
I would think that a user typing myurl.com/mywebapp is far from rare. Is there something I'm missing?
© Server Fault or respective owner