tomcat 8 重定向,连接出现中文时报错。

16-Oct-2023 11:30:34.862 警告 [http-nio-8080-exec-11] org.apache.coyote.http11.Http11Processor.prepareResponse HTTP响应
头信息[Location] 值[/qc/upload/pdf/浙江-radZq99L.pdf],由于无效已从响应中移除
        java.lang.IllegalArgumentException: 代码点[27,993]处的Unicode字符[浙]无法编码,因为它超出了允许的0到255范围。
                at org.apache.tomcat.util.buf.MessageBytes.toBytesSimple(MessageBytes.java:286)
                at org.apache.tomcat.util.buf.MessageBytes.toBytes(MessageBytes.java:259)
                at org.apache.coyote.http11.Http11OutputBuffer.write(Http11OutputBuffer.java:438)
                at org.apache.coyote.http11.Http11OutputBuffer.sendHeader(Http11OutputBuffer.java:417)
                at org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1271)
                at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:380)
                at org.apache.coyote.Response.action(Response.java:206)
                at org.apache.coyote.Response.sendHeaders(Response.java:415)
                at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:309)
                at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:268)
                at org.apache.catalina.connector.Response.finishResponse(Response.java:439)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:372)
                at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:617)
                at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
                at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:932)
                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1694)
                at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
                at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
                at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
                at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
                at java.lang.Thread.run(Thread.java:748)

评论区

热门反馈

扫码入社