You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building a link with methodOn, and supplying values for some parameters but not all, a link template with variables for the remaining parameters is created, while the supplied values are already expanded. When expanding the resulting template, the initially supplied values are url-encoded again, leading to invalid URLs. This affects explicitly calling expand() of course, but also the pagination links of the PagedResourcesAssembler from Spring Data. Here is some code example:
As you see, the + in the date has been encoded correctly in the template, but the %-sign has been encoded again in the expanded link, even twice as shown by the additional 25.
I have a runnable example with a test case in this repository
The text was updated successfully, but these errors were encountered:
When building a link with
methodOn
, and supplying values for some parameters but not all, a link template with variables for the remaining parameters is created, while the supplied values are already expanded. When expanding the resulting template, the initially supplied values are url-encoded again, leading to invalid URLs. This affects explicitly callingexpand()
of course, but also the pagination links of thePagedResourcesAssembler
from Spring Data. Here is some code example:This leads to following response:
As you see, the
+
in the date has been encoded correctly in the template, but the%
-sign has been encoded again in the expanded link, even twice as shown by the additional25
.I have a runnable example with a test case in this repository
The text was updated successfully, but these errors were encountered: