I’ve got a resource on my server named:
some image.png
There’s a space in the name. When I type the url into the browser (chrome), it’s transforming the space into %20:
some%20.png
WHen I use URLEncoder.encode(“some image.png”) from my application, I’m getting:
some+image.png
which causes a 404. What’s the right way to encode?
http://www.permadi.com/tutorial/urlEncoding/
However, your code is probably failing because some parsers/web servers do not handle them equally for base URL portions – and only recognize
+ = spacein the querystring portion