From c08014ed2c6367503a690bf4a47c090f3a43d5de Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Sun, 27 Sep 2015 23:29:26 +0300 Subject: [PATCH] Do not rely on content-type to detect errors (#19009) Change-Id: I8be0a85d43033d99ac73724a3c4621e13ba3f32b --- .../com/vaadin/client/communication/XhrConnection.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/client/src/com/vaadin/client/communication/XhrConnection.java b/client/src/com/vaadin/client/communication/XhrConnection.java index 1de6fb15c8..ff8155259e 100644 --- a/client/src/com/vaadin/client/communication/XhrConnection.java +++ b/client/src/com/vaadin/client/communication/XhrConnection.java @@ -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(); -- 2.39.5