Tomcat 8 is not able to handle get request with '|' in query parameters?

前端 未结 7 581
半阙折子戏
半阙折子戏 2020-11-27 04:19

I am using Tomcat 8. In one case I need to handle external request coming from external source where the request has a parameters where it is separated by |.

7条回答
  •  南笙
    南笙 (楼主)
    2020-11-27 04:35

    Since Tomcat 7.0.76, 8.0.42, 8.5.12 you can define property requestTargetAllow to allow forbiden characters.

    Add this line in your catalina.properties

    tomcat.util.http.parser.HttpParser.requestTargetAllow=|{}
    

提交回复
热议问题