You created and saved a custom query, but accessing it returned an "HTTP Status 400 - Bad Request" error, referencing "The valid characters are defined in RFC 7230 and RFC 3986". However, the query worked correctly after associating it with a list via the Queue Manager. Replacing "list_in.htmpl" with a non-customized version didn't fix the problem.
Release: 17.4 +
Components: CASM - Tomcat
The presence of special characters such as [ ] &#... embedded in the HTTP request header causing "Bad Request" error in tomcat.
Add the following to the HTTP and HTTPS connector tags in server.xml file as outlined in the technical documentation linked here: Invalid character is found in the request target
relaxedPathChars="[]|{}^\`"<>" relaxedQueryChars="[]|{}^\`"<>"
Example: The out of box Connector tag for regular HTTP in server.xml will read as:
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
Modified, it will read as:
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443" relaxedPathChars="[]|{}^\`"<>" relaxedQueryChars="[]|{}^\`"<>"/>