]> source.dussan.org Git - vaadin-framework.git/commitdiff
Do not rely on content-type to detect errors (#19009)
authorArtur Signell <artur@vaadin.com>
Sun, 27 Sep 2015 20:29:26 +0000 (23:29 +0300)
committerArtur Signell <artur@vaadin.com>
Sun, 27 Sep 2015 20:29:41 +0000 (23:29 +0300)
Change-Id: I8be0a85d43033d99ac73724a3c4621e13ba3f32b

client/src/com/vaadin/client/communication/XhrConnection.java

index 1de6fb15c89d7f683eada3eaa00d423949cc0a0a..ff8155259ead736d6cce653ce4e299878e5ffe81 100644 (file)
@@ -151,14 +151,6 @@ public class XhrConnection {
                             + Util.round(Profiler.getRelativeTimeMillis()
                                     - requestStartTime, 3) + "ms");
 
-            String contentType = response.getHeader("Content-Type");
-            if (contentType == null
-                    || !contentType.startsWith("application/json")) {
-                getConnectionStateHandler().xhrInvalidContent(
-                        new XhrConnectionError(request, payload, response));
-                return;
-            }
-
             // for(;;);["+ realJson +"]"
             String responseText = response.getText();