1. 程式人生 > >Invalid character found in the request target The valid cha

Invalid character found in the request target The valid cha

分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow

也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!

               

轉載:(http://blog.csdn.net/zeroso/article/details/70592179)

錯誤現象:

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:1000)
 at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
 
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
 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)



最近部署專案的時候,由於MIS配置的是Tomcat 8.5的服務端,導致Web應用不正常,報HTTP 400錯誤(Chrome無異常、IE報錯)。問題原因初步判斷為8.5版本的服務端接收請求不會對符號進行轉義,Chrome不異常的原因或許是瀏覽器自身轉義了。具體錯誤資訊如下:


 Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level. java