the following controller method is specified, where username = bob and emailAddress = bob@bob.com
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 a call, the resulting URL gets:
local: 8080 / api / v1 / users / bob / reset_password email_address = bob% 40bob.com
then in other cases I get: local: 8080 / API / v1 / users / bob / reset_password email_address = bob% 2540bob.com
In the second case, @ was encoded once to% 40, and then% was again encoded to% 25, ββso you ended up in% 2540
If I do no more than wait a minute, the problem disappears, which makes me think of some kind of caching problem, but I canβt understand what it is.
java urlencode playframework
dstarh
source share