fix parameter/multimap handling with duplicates
This commit is contained in:
parent
0a31fca8fe
commit
41cca5c606
1 changed files with 3 additions and 2 deletions
|
@ -94,12 +94,12 @@ public abstract class BaseHttpRequestBuilder implements HttpRequestBuilder {
|
|||
setHeaders(httpHeaders);
|
||||
setRequestURI(Maps.getString(map, "requesturi"));
|
||||
setRequestPath(Maps.getString(map, "requestpath"));
|
||||
ParameterBuilder parameterBuilder = Parameter.builder().domain(Parameter.Domain.QUERY);
|
||||
ParameterBuilder parameterBuilder = Parameter.builder().domain(Parameter.Domain.QUERY).enableDuplicates();
|
||||
Map<String, Object> parameterMap = (Map<String, Object>) map.get("parameter");
|
||||
Arrays.asList(Parameter.Domain.QUERY, Parameter.Domain.PATH, Parameter.Domain.FORM, Parameter.Domain.COOKIE, Parameter.Domain.HEADER).forEach(d -> {
|
||||
Map<String, Object> m = (Map<String, Object>) parameterMap.get(d.name().toLowerCase(Locale.ROOT));
|
||||
if (m != null) {
|
||||
ParameterBuilder p = Parameter.builder().domain(d);
|
||||
ParameterBuilder p = Parameter.builder().domain(d).enableDuplicates();
|
||||
m.forEach(p::add);
|
||||
parameterBuilder.add(p.build());
|
||||
}
|
||||
|
@ -195,6 +195,7 @@ public abstract class BaseHttpRequestBuilder implements HttpRequestBuilder {
|
|||
return byteBuffer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharBuffer getBodyAsChars(Charset charset) {
|
||||
if (charBuffer == null) {
|
||||
charBuffer = byteBuffer != null ? charset.decode(byteBuffer) : null;
|
||||
|
|
Loading…
Reference in a new issue