I try send request like http://site.com/abc%2Fabc and it doesn\'t work (send status 400). How I understand tomcat doesn\'t accept encoded path separators for security reasons, b
We can also add this entry "org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true" in catalina.properties to allow encoded slash in url.
And to allow backslash you have to set different properties. Refer this url for different configuration.
To make this workable for my by editing $CATALINA_HOME\conf\server.xml
Old Value: <Connector ... protocol="HTTP/1.1"... />
New Value: <Connector ... protocol="HTTP/1.1"... relaxedQueryChars='\ { } |' />
I am using Tomcat 7.0.88
Have you tried putting URIEncoding="UTF-8"
in your <Connector
in the server.xml
?
There is a Tomcat option to allow encoded path separators.
Set the CATALINA_OPTS env var to
-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
This will allow encoded slashes.