Java Reading Undecoded URL from Servlet

前端 未结 5 989
误落风尘
误落风尘 2021-02-10 02:32

Let\'s presume that I have string like \'=&?/;#+%\' to be a part of my URL, let\'s say like this:

example.com/servletPath/someOtherPath/myString/something.ht         


        
5条回答
  •  广开言路
    2021-02-10 02:47

    If there's a %2F in the decoded url, it means the encoded url contained %252F.

    Since %2F is / Why not just split on "\/" and not worry about URL encoding?

提交回复
热议问题