fix error in check mediaType

This commit is contained in:
mghalbi 2023-02-24 12:08:17 +01:00 committed by Pedro Igor
parent 116b2fed0c
commit e19e7bef2d

View file

@ -60,7 +60,7 @@ public class HttpRequestImpl implements HttpRequest {
return null;
}
MediaType mediaType = getHttpHeaders().getMediaType();
if (mediaType.isCompatible(MediaType.valueOf("application/x-www-form-urlencoded"))) {
if (mediaType == null || !mediaType.isCompatible(MediaType.valueOf("application/x-www-form-urlencoded"))) {
return new MultivaluedHashMap<>();
}
return delegate.getDecodedFormParameters();