org.eclipse.jetty.http.BadMessageException: 400: Unable to parse URI query at org.eclipse.jetty.server.Request.getParameters(Request.java:454) at org.eclipse.jetty.server.Request.getParameter(Request.java:1075) at ...Since this is not due to something in the code, there's nothing I can do about it. If I try "/foo%", I get a 400 response before my code sees it, which is OK.
I'd like to ignore the exception, but I'd prefer not to have to make the code dependent on a class which is Jetty-specific. However, BME is derived from RuntimeException, so I can't just ignore the base class either.
Plan B: Call request.getParameter() inside a try block at the start of request processing, and return a 400 response (as this exception seems to be trying to do) if an exception is thrown. But are there any other gotchas like this that I need to be aware of here? What other exceptions might it throw, and under what circumstances?
Any ideas? What would *you* do in this situation? -- John English
Back to the top