How can I identify the reason for an http 400 error code tomcat?

Viewed 1731

We are getting intermittent 400 response errors to some of our requests and I have tried to track down what is the cause of the 400. The access log from tomcat shows the 400 response. So I added in the request-dumper filter for tomcat. Looking at the logs, I'm not getting anything from this filter for when the 400 occurs. In the request-dumper log, the information for the requests that succeeded that were immediately before and after this error are in log, but nothing for the request that generated a 400 response. I'm looking for suggestions on what/how to track this down in tomcat. I thought the request-dumper would do it, but as I said nothing is generated in that log.

1 Answers

I am also facing the same issue after upgrading the tomcat from Tomcat_7 to Tomcat_9 for our API. The same code was working fine in version 7. It is a GET call from a frontend application which makes a to the API which is running on TC_9. Now the Tomcat-9 that hosts the API is rejecting the call with 400 bad request

One thing to note - One of the query parameter in the URL has a lot of (around 60-70) comma separated values like this https://?custId=value1&attribute=v1,v2,v3,v4,..........,v70

Due to this Total number of text characters in the entire URL is around 4000+

Related