From 8df704e6051c27648571c56a8f35bede253eb3c4 Mon Sep 17 00:00:00 2001 From: kimchy Date: Tue, 11 May 2010 22:40:02 +0300 Subject: [PATCH] allow for json and xson to be parsed in content type --- .../java/org/elasticsearch/util/xcontent/XContentType.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/util/xcontent/XContentType.java b/modules/elasticsearch/src/main/java/org/elasticsearch/util/xcontent/XContentType.java index 914bf58b4dd..c52fd913eb3 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/util/xcontent/XContentType.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/util/xcontent/XContentType.java @@ -39,11 +39,11 @@ public enum XContentType { if (contentType == null) { return null; } - if ("application/json".equals(contentType)) { + if ("application/json".equals(contentType) || "json".equalsIgnoreCase(contentType)) { return JSON; } - if ("application/xson".equals(contentType)) { + if ("application/xson".equals(contentType) || "xson".equalsIgnoreCase(contentType)) { return XSON; }