Jan 16, 2019 5:57:40 AM org.apache.coyote.http11.AbstractHttp11Processor process 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.InternalAprInputBuffer.parseRequestLine(InternalAprInputBuffer.java:235) 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.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2486) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)
原因分析:
这个问题是高版本tomcat中的新特性:严格按照RFC 3986规范进行访问解析,而RFC3986规范定义了URL中只允许包含英文字母(a-zA-Z)、数字(0-9)、 (-_.~)4个特殊字符以及所有保留字符(!*‘();:@&=+$,/?#[])。
如果系统在通过地址传值时,在url中传了一段json,传入的参数中有"{"不在RFC 3986的保留字段中,所以会报这个错
解决办法:
当前证实的解决办法:
使用低版本的tomcat(7.0.73之前)