Tomcat 9.0.13 I switched from tomcat 8.5.35 to 9.0.13. In 8.5 when I send an unencoded character in queryString it throws 400 error in the browser itself and no Exception is thrown or seen explicitly.
After I switched to tomcat 9, when I send an unencoded character in queryString it throws Exception and tomcat error page is shown. I configured error-page in both the servers. I know that these characters can be relaxed by adding them in relaxedquerychars in server.xml. But still it is a 400 error and ideally it must redirect me to the configured error page. Also when the response.setStatus(400) is called, error page is not redirected in both the servers. web.xml - <web-app> <error-page> <error-code>400</error-code> <location>/error.jsp</location> </error-page> <error-page> <error-code>500</error-code> <location>/error.jsp</location> </error-page> </web-app> URL=http://localhost:9013/app1/paramTest.jsp?name=^ Tomcat 8.5.32 - 'This page isn’t working' is shown in browser. Tomcat 9.0.13 - java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986 org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:467) org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:294) org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:791) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417) org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) java.lang.Thread.run(Thread.java:748) is thrown and tomcat error page is shown. I have attached the screenshot of the exception thrown. Do the needful. Regards, Melvin A
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org