Removed support for application/json content
This commit is contained in:
parent
183983be7f
commit
8e40d91877
@ -17,7 +17,6 @@ public class ContentTypeValidator implements ConstraintValidator<ContentTypeCons
|
|||||||
|
|
||||||
private static final Set<String> SUPPORTED_CONTENT_TYPES = Sets.newHashSet(
|
private static final Set<String> SUPPORTED_CONTENT_TYPES = Sets.newHashSet(
|
||||||
MediaType.APPLICATION_XML,
|
MediaType.APPLICATION_XML,
|
||||||
MediaType.APPLICATION_JSON,
|
|
||||||
MediaType.APPLICATION_FORM_URLENCODED,
|
MediaType.APPLICATION_FORM_URLENCODED,
|
||||||
MediaType.MULTIPART_FORM_DATA
|
MediaType.MULTIPART_FORM_DATA
|
||||||
);
|
);
|
||||||
|
@ -29,6 +29,7 @@ public class GetChecksumValidator implements ConstraintValidator<GetChecksumCons
|
|||||||
boolean requestBodyPresent = request.getContentLength() > 0;
|
boolean requestBodyPresent = request.getContentLength() > 0;
|
||||||
|
|
||||||
String contentType = request.getContentType();
|
String contentType = request.getContentType();
|
||||||
|
log.info("Request content type: {}", contentType);
|
||||||
if (contentType != null) {
|
if (contentType != null) {
|
||||||
if (contentType.equalsIgnoreCase(MediaType.APPLICATION_FORM_URLENCODED) || contentType.equalsIgnoreCase(MediaType.MULTIPART_FORM_DATA)) {
|
if (contentType.equalsIgnoreCase(MediaType.APPLICATION_FORM_URLENCODED) || contentType.equalsIgnoreCase(MediaType.MULTIPART_FORM_DATA)) {
|
||||||
if (queryStringPresent && requestBodyPresent) return false;
|
if (queryStringPresent && requestBodyPresent) return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user