diff --git a/services/src/main/java/org/keycloak/services/HttpRequestImpl.java b/services/src/main/java/org/keycloak/services/HttpRequestImpl.java index 102f94dbea..067083d054 100644 --- a/services/src/main/java/org/keycloak/services/HttpRequestImpl.java +++ b/services/src/main/java/org/keycloak/services/HttpRequestImpl.java @@ -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();