|
@@ -544,7 +544,9 @@ public class KMSClientProvider extends KeyProvider implements CryptoExtension,
|
|
|
// AuthenticatedURL properly to set authToken post initialization)
|
|
|
}
|
|
|
HttpExceptionUtils.validateResponse(conn, expectedResponse);
|
|
|
- if (APPLICATION_JSON_MIME.equalsIgnoreCase(conn.getContentType())
|
|
|
+ if (conn.getContentType() != null
|
|
|
+ && conn.getContentType().trim().toLowerCase()
|
|
|
+ .startsWith(APPLICATION_JSON_MIME)
|
|
|
&& klass != null) {
|
|
|
ObjectMapper mapper = new ObjectMapper();
|
|
|
InputStream is = null;
|