get - Is there a way to escape all the special characters in a url string parameter? -


i need users able pass file path parameter of url (the file not uploaded , local file path used security reasons). it's difficult them go , change backslashes "%5". wondering if there way force encoding of part of url. example simple putting in double quotes, doesn't work...

http://example.com/"c:\user\somone\somefile.txt"/dosomething

i ended using pattern matching of rest routes @ server level. this:

/example.com/*path/dosomething

so match path slashes/backslashes. @ last decoding of url rid of escaped characters passed browser chars space.

java.net.urldecoder.decode(path, "utf-8")


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -