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

前端 未结 7 579
半阙折子戏
半阙折子戏 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

    The URI is encoded as UTF-8, but Tomcat is decoding them as ISO-8859-1. You need to edit the connector settings in the server.xml and add the URIEncoding="UTF-8" attribute.

    or edit this parameter on your application.properties

    server.tomcat.uri-encoding=utf-8

提交回复
热议问题