Added check for the presence of Content-Type header in the request
This commit is contained in:
parent
fbf5541802
commit
116b2fed0c
1 changed files with 4 additions and 0 deletions
|
@ -59,6 +59,10 @@ public class HttpRequestImpl implements HttpRequest {
|
|||
if (delegate == null) {
|
||||
return null;
|
||||
}
|
||||
MediaType mediaType = getHttpHeaders().getMediaType();
|
||||
if (mediaType.isCompatible(MediaType.valueOf("application/x-www-form-urlencoded"))) {
|
||||
return new MultivaluedHashMap<>();
|
||||
}
|
||||
return delegate.getDecodedFormParameters();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue