Bug 62398 - HTTP Error - Error parsing HTTP request header
Summary: HTTP Error - Error parsing HTTP request header
Status: RESOLVED DUPLICATE of bug 62273
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 8.5.31
Hardware: PC All
: P2 major (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2018-05-22 14:03 UTC by Matthew Davie
Modified: 2018-05-22 14:12 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Davie 2018-05-22 14:03:52 UTC
- Worked in Tomcat 8.5.23 but not in 8.5.31 after an upgrade

May 22, 2018 12:34:37 PM org.apache.coyote.http11.Http11Processor service
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.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:479)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:687)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Unknown Source)
Comment 1 Mark Thomas 2018-05-22 14:12:58 UTC
The client is buggy and sending invalid HTTP requests containing characters in the request target that should be %nn encoded. Tomcat is now rejecting these requests by default.

Additional options to enable users to configure Tomcat to accept these characters in raw (non %nn encoded) for were added in:
- trunk for 9.0.8 onwards
- 8.5.x for 8.5.31 onwards
- 8.0.x for 8.0.52 onwards
- 7.0.x for 7.0.87 onwards

*** This bug has been marked as a duplicate of bug 62273 ***