'Tomcat return 400 for URL containing %00

I am using Servlet and tomcat to build an HTTP Middleware that intercepts HTTP requests, logs them, and probably rewrites them. I notice that when the request URL contains '%00' like the following: /channel/%00List%0000001%00 Tomcat will just return 400 without calling my Servlet. Is there a configuration to change this behavior? I have used encodedSolidusHandling="passthrough" for the connector, but it seems that it only works for characters like %2B and %2F, but not for %00



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source