zoukankan      html  css  js  c++  java
  • 【解决】The valid characters are defined in RFC 7230 and RFC 3986

    【我的问题】使用tomcat-7.0.104版本启动war包,通过Postman发送get请求,后台报错无效字符

    Jul 17, 2020 11:16:19 AM org.apache.coyote.http11.AbstractHttp11Processor process
    INFO: 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 the request target [/AppHttpServer/childServlet?resultMsg=jQuery110207745351287510183_1593847521419&data={%22personBirthday%22:%222009-01-23%22,%22personName%22:%22%22,%22personCardno%22:%222009242180%22,%22personNo%22:%22%22,%22logo%22:%22phone%22,%22wxinId%22:%22oDlo2t1NknzCrLea_6D5JRi4I0Cc%22}]. 
    The valid characters are defined in RFC 7230 and RFC 3986 at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:213) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1108) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:654) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:317) 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)

    【解决办法】修改$TOMCAT_HOME/conf/catalina.properties,添加属性 tomcat.util.http.parser.HttpParser.requestTargetAllow=|{}

    如果是springboot工程,可以在SpringBootApplication的的main方法中增加 System.setProperty("tomcat.util.http.parser.HttpParser.requestTargetAllow","|{}");

    更多参考>>>解决Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 问题

  • 相关阅读:
    C 库函数 ------ qsort()
    递归之美
    C函数库 ------ ctype.h
    scanf 多行输入判断结束
    POSIX库、glibc库、pthreads库、libc库、newlib、uClibc
    Docker 私有仓库搭建
    在daemon.json中配置主机后无法启动docker
    MySQL配置HeartBeat实现心跳监控和浮动IP
    Heartbeat基础知识-运维小结
    (二) Docker中启动镜像
  • 原文地址:https://www.cnblogs.com/leozhanggg/p/13345330.html
Copyright © 2011-2022 走看看