Reply To: Problems with enconded slashs inside param values

Splash Forums Rewrite Users Problems with enconded slashs inside param values Reply To: Problems with enconded slashs inside param values

#25911

ravindra
Participant

Hi

FYI

String str=test/slash
str= StringUtils.replaceEach(str, new String[]{“/”},new String[]{“%2F”);
str=URLEncoder.encode(str , “UTF-8″);

Final Result something like this

http://localhost:8080/rewrite-slash/mapped/data/test%252Fslash

“/” is path parameter separator right , so we need to double encode this character while passing through as a query parameter.

when rewrite using with tomcat “/” is path parameter separater , when “/” having in query string , it should break the url and return 400 error, so we need to double encode the “/” while passing in a Query String.

Hope above code will work
check once above url hope it will work.

Regards
Ravindra.

  • This reply was modified 7 years, 11 months ago by  ravindra.
  • This reply was modified 7 years, 11 months ago by  ravindra.