gpt4 book ai didi

spring-boot - 什么是错误 "Invalid character found in method name. HTTP method names must be tokens"

转载 作者:行者123 更新时间:2023-12-03 23:09:25 46 4
gpt4 key购买 nike

使用 Spring Boot 时出现以下错误。我启用了 TRACE 级别的日志记录,但仍然不确定是什么导致了它或如何修复它。

[TRACE] 2020-01-02 12:12:23.749 [http-nio-9000-exec-1] DispatcherServlet - "ERROR" dispatch for GET "/error", paramet
ers={}, headers={masked} in DispatcherServlet 'dispatcherServlet'
[TRACE] 2020-01-02 12:12:23.750 [http-nio-9000-exec-1] RequestMappingHandlerMapping - 2 matching mappings: [{ /error}
, { /error, produces [text/html]}]
[TRACE] 2020-01-02 12:12:23.751 [http-nio-9000-exec-1] RequestMappingHandlerMapping - Mapped to public org.springfram
ework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.w
/Exc
...skipping
[INFO ] 2020-01-02 16:29:57.815 [http-nio-9000-exec-31] Http11Processor - Error parsing HTTP request header
Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens
at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:415) ~[tomcat-embed-cor
e-9.0.26.jar!/:9.0.26]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:292) [tomcat-embed-core-9.0.26.jar!/
:9.0.26]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-9.0.26
.jar!/:9.0.26]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860) [tomcat-embed-core
-9.0.26.jar!/:9.0.26]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1589) [tomcat-embed-core-9.0
.26.jar!/:9.0.26]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.26.
jar!/:9.0.26]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_232]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_232]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.
26.jar!/:9.0.26]

最佳答案

在未启用 HTTPS 的端点上执行来自客户端的 HTTPS 请求,请参阅

java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens

关于spring-boot - 什么是错误 "Invalid character found in method name. HTTP method names must be tokens",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59634635/

46 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com