Invalid character found in the request target in spring boot

后端 未结 6 715
自闭症患者
自闭症患者 2020-12-09 08:27

My application is started with java -jar with version 1.5.6.RELEASE of spring boot.
The content of one of my request has the character \"{\".When it is sended to serve

6条回答
  •  难免孤独
    2020-12-09 09:20

    Encode it to Base 64 string at request end and decode it at the controller end.


    Encode

    btoa(string)


    Decode:

    String arr = request.getParameter();
    arr = new String(Base64.getDecoder().decode(arr))
    

提交回复
热议问题