HTTP Status 400 – Bad Request

大稳·杨發表於2024-06-07

1. 問題

2. 原因

org.apache.juli.logging.DirectJDKLog:log|Error parsing HTTP request header

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

java.lang.IllegalArgumentException: Request header is too large

        at org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:720)

        at org.apache.coyote.http11.Http11InputBuffer.parseHeader(Http11InputBuffer.java:867)

        at org.apache.coyote.http11.Http11InputBuffer.parseHeaders(Http11InputBuffer.java:573)

        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:700)

        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)

        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)

        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

        at java.lang.Thread.run(Thread.java:748)

3. 解決方案

排查請求頭,看看哪個header值比較大,去掉header就可以請求成功了。

我這個原因是cookie有問題,清理一下瀏覽器快取就行了。

相關文章