Servlet Filter causes problems, but only for POST requests
New poster here, and very new to Java... I have been working on a servlet filter for a few days now, and ran into a strange problem that leads me to think I must be missing something.
I'm using the filter to resolve a security problem in an application; I'm checking for certain parameters in the request, and if they exist, I check them against a whitelist of expected values. If they have an expected value, I just pass the request down the filter chain; if not, I redirect the user to an error page.
The filter works fine for GET requests, but it's causing problems for POSTs. Weird problems. It's not redirecting the user to the error page; the POSTs are simply not working. It appears the POST data is getting mangled somehow before it reaches the application. It's difficult to troubleshoot, because I can't see the request after it leaves the filter, and the app doesn't return a meaningful error; it typically looks like what would happen if you searched for records that don't exist, but I'm clicking on links to existing records...
All I can say for sure is that with my filter enabled, no POSTs work correctly anywhere in the application... and when I disable the filter, they all work fine. Is there something I need to be careful about when dealing with POSTs vs. GETs?