Closed
Description
Dave Syer opened SPR-8403 and commented
Maybe people tend not to use UriTemplate with query strings? UriUtils actually has some code for encoding query parameters and for encoding the whole query string, but UriTemplate only uses the latter. The query parameter encoding method is used by the JSP tag UrlTag, so from that I assume that there is a good technical reason for doing the encoding. Example from the JSP case (where UriTemplate will leave the input unchanged):
foo?bar=a=b&c -> foo?bar=a%3Db&c
I think it would be easy to implement (by splitting the query string on '&' and feeding the parts through the parameter encoding method) if we can agree on the principle.
Affects: 3.0.5
Issue Links:
- UriUtils does double encode [SPR-8507] #13153 UriUtils does double encode
- RestTemplate cannot support OAuth [SPR-6143] #10811 RestTemplate cannot support OAuth
- UriTemplate takes wrong approach at encoding substituted template variables [SPR-8662] #13304 UriTemplate takes wrong approach at encoding substituted template variables