-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancementA general enhancement
Description
Greg Turnquist opened SPR-16279 and commented
Spring HATEOAS leverage's Spring Framework's UriTemplate class. However, in certain scenarios, the user provides a URI Template that is already encoded (e.g. /foo/b%20ar{?x
}). In this scenario, when creating a Spring Framework UriTemplate, the "%" gets encoded into%25. And because we wrap this some of our own goodness, it actually gets encoded twice when doing an expand (e.g. x=>1
in this case).
It would be useful if there was an optional to indicate "do not encode", possibly here?
public URI expand(Map<String, ?> uriVariables) {
UriComponents expandedComponents = this.uriComponents.expand(uriVariables);
UriComponents encodedComponents = expandedComponents.encode();
return encodedComponents.toUri();
}
A flag here, or an overloaded method to side step encoding would make it possible.
Related issue
Reference URL: spring-projects/spring-hateoas#593
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancementA general enhancement