Apparently brackets are not allowed in URI paths.
I'm not sure if this is a Tomcat problem but I'm getting request with paths that contains ]
.
In otherwords
request.getRequestURL() == "http://localhost:8080/a]b"
request.getRequestURI() == "/a]b"
BTW getRequestURL() and URI are generally escaped ie for http://localhost:8080/a b
request.getRequestURL() == "http://localhost:8080/a%20b"
So if you try to do:
new URI("http://localhost:8080/a]b")
new URI(request.getRequestURL())
It will fail with a URI parsing exception.
If I escape the path that will make the %20
double escaped.
How do I turn Servlet Request URLs into URIs?