Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Play Framework double url encoding

given the following controller method where username = bob and emailAddress = [email protected]

    public static void resetPassword(String username, String emailAddress) {

            String url = BASE_URL + "/users/" + username + "/reset_password";

            HttpResponse response = WS.url(url).setParameter("email_address", emailAddress).get();
}

Sometimes when I make the call the url endpoing receives:

localhost:8080/api/v1/users/bob/reset_password?email_address=bob%40bob.com

then other times i get: localhost:8080/api/v1/users/bob/reset_password?email_address=bob%2540bob.com

On the second one the @ has been encoded once to %40 then the % was again encoded to %25 so you end up with %2540

If I do nothing more than wait a minute the problem goes away which makes me think it's some sort of caching problem but I can't seem to figure out what it is.

like image 661
dstarh Avatar asked Mar 31 '11 20:03

dstarh


1 Answers

finally been recognized as a bug and has been fixed in a later release

like image 74
dstarh Avatar answered Nov 18 '22 23:11

dstarh