Skip to content

Commit

Permalink
PathParams double encoding fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dkaukov committed Dec 13, 2023
1 parent 034ebfb commit 4212cd7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ private void applyPathParams(
do {
final String paramName = pathParamMatcher.group(1);
getPathParamValueFunction.apply(paramName).ifPresent(paramValue ->
uriVariables.put(paramName, UriUtils.encode((String) paramValue, Charsets.UTF_8))
uriVariables.put(paramName, paramValue)
);
} while (pathParamMatcher.find());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ public class GetTest {
RestAssuredMockMvc.given().
standaloneSetup(new GreetingController()).
when().
get("/greeting?name={name}", "Johan").
get("/greeting?name={name}", "Johan@test.com").
then().
body("id", equalTo(1)).
body("content", equalTo("Hello, Johan!"));
body("content", equalTo("Hello, Johan@test.com!"));
}
}

0 comments on commit 4212cd7

Please sign in to comment.