We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c53ef1 commit 8df704eCopy full SHA for 8df704e
modules/elasticsearch/src/main/java/org/elasticsearch/util/xcontent/XContentType.java
@@ -39,11 +39,11 @@ public static XContentType fromRestContentType(String contentType) {
39
if (contentType == null) {
40
return null;
41
}
42
- if ("application/json".equals(contentType)) {
+ if ("application/json".equals(contentType) || "json".equalsIgnoreCase(contentType)) {
43
return JSON;
44
45
46
- if ("application/xson".equals(contentType)) {
+ if ("application/xson".equals(contentType) || "xson".equalsIgnoreCase(contentType)) {
47
return XSON;
48
49
0 commit comments