1

I have the following errors in my Tomcat 7 log:

INFO: Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level. java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986 at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:189) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1028) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748)

I know from StackOverflow how to resolve this. But I see that there are comments about this might be causing a security vulnerability.

I would like to know how to find out what is the actual request causing this issue. Like the full url path, headers etc. Unfortunately, my log file is scattered with the error messges which are quite cryptic and don't say anything about the actual request. I prefer to first find out the calls being made and see if I can get my clients to better behave.

Any idea how to change the logging to show the actual request causing this?

checklist
  • 12,340
  • 15
  • 58
  • 102

0 Answers0