-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Milestone
Description
given url /test?key=v1&Key=v2&KEY=v3 it should return different value as below, but now it all returns v3
rc.request.getParam("key") //should return v1
rc.request.getParam("Key") //should return v2
rc.request.getParam("KEY") //should return v3
6.2.2.1. Case Normalization
When a URI uses components of the generic syntax, the component syntax equivalence rules always apply; namely, that the scheme and host are case-insensitive and therefore should be normalized to lowercase. For example, the URI is equivalent to http://www.example.com/.
The other generic syntax components are assumed to be case-sensitive unless specifically defined otherwise by the scheme (see Section 6.2.3).
The code causing issue is HttpUtils.params , it should not use CaseInsensitiveHeaders
static MultiMap params(String uri) {
QueryStringDecoder queryStringDecoder = new QueryStringDecoder(uri);
Map<String, List<String>> prms = queryStringDecoder.parameters();
MultiMap params = new CaseInsensitiveHeaders();
if (!prms.isEmpty()) {
for (Map.Entry<String, List<String>> entry: prms.entrySet()) {
params.add(entry.getKey(), entry.getValue());
}
}
return params;
}
Metadata
Metadata
Assignees
Labels
No labels