-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Melvin,

On 12/18/18 04:21, Melvin wrote:
> 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.

That doesn't make any sense. Browsers don't throw HTTP errors.

> After I switched to tomcat 9, when I send an unencoded character
> in queryString it throws Exception and tomcat error page is shown.
As it should be.

> I configured error-page in both the servers.

How/where?

> 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.
Are you saying that configuring relaxedquerychars does not work? If
so, please post that configuration.

> Also when the response.setStatus(400) is called, error page is not 
> redirected in both the servers.

Where are you configuring your error page. This isn't unambiguous:

> 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(Http11Inpu
tBuffer.java:467)
>
> 
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:29
4)
> org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLigh
t.java:66)
>
> 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractPro
tocol.java:791)
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoi
nt.java:1417)
>
> 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.j
ava:49)
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.j
ava:1149)
>
> 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
va:624)
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThr
ead.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.

Attachments are stripped, but presumably, it's just a screenshot of
the above.

Please explain where you have configured that error page, and show
your relaxedquerychars setting (if you have one).

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlwZD7oACgkQHPApP6U8
pFg+1xAAsK6do1HFtdhQG4uNczRo/NgHOvDF0Z4yWolntEEZdDb+dzsqqtUZhRNg
5n3q9o3hL2bLBjy+zetuuIVBg7ZxmgcC0QnlhLW+zgOScvGRRSwFi/NOieBgEOe4
fite15CdaSd9OSv/jVTDqkgL0LEGVnioGgzYaXlzmGWEI/6BpEbBwmLJpqofQ6ij
EFVbDis2tPc/kwP8JPYll2ihFpPNUacEE+SB/BQyAzOXR1OzAGRYqMFZlfpwfpZ4
cwCsTwWZeWmKX7PLQjyhE2lCT5a3tioLRAbIyw3P92WJTy4Iwn65EBnf6BcXLF0f
zuYZYwV1VXut81g8nBcby08si2R+qFHyJ2nIQ2oJWurtf+W4FiQ6Sh4fF7pSN9aI
FSEknFeFiAYgP/tNDCi40uRVe+HfRczMnYWScR7QmO0U5Ir6/5gM3I6hUOaOYQpl
s1uL6Tqq7+/7HxSP5PKjxgYg6sJVk8qo7nHuUH/kvJP/gbEQtghJUhQ/xIrZq/e8
Gg1xTmm4DGZ9xFl9RLHQQqvlbHVQuVfYYVsbfC3pHz2SSevIye+ZAg0CnyXCzFGs
Ywgsf8VJ/yVbOp80wLd95zsbvmZ/7qK1mtx8aeeLzE8gCrOVr0yYagFsV+AiyQU7
iGfckuRXbztZ33oJK1fY4Y+QELFuUD3ceAYTy+/L/Exw6NQg8Kc=
=0by1
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to