From 8fcad2fe496d04b4f4fa6e8eebee673226fe70d4 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Thu, 18 Apr 2013 00:52:33 +0300 Subject: Restrict longer padding to IE8 as Chrome fails without the original padding (#11573) Change-Id: I00742d66052e318a023ed8ec2e3e5afbc7a3199f --- server/src/com/vaadin/server/communication/PushHandler.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'server/src') diff --git a/server/src/com/vaadin/server/communication/PushHandler.java b/server/src/com/vaadin/server/communication/PushHandler.java index 0057a71c83..f65a0cba10 100644 --- a/server/src/com/vaadin/server/communication/PushHandler.java +++ b/server/src/com/vaadin/server/communication/PushHandler.java @@ -36,6 +36,7 @@ import com.vaadin.server.VaadinService; import com.vaadin.server.VaadinServletRequest; import com.vaadin.server.VaadinServletService; import com.vaadin.server.VaadinSession; +import com.vaadin.server.WebBrowser; import com.vaadin.ui.UI; /** @@ -104,8 +105,12 @@ public class PushHandler implements AtmosphereHandler { "text/plain; charset=UTF-8"); if (resource.transport() == TRANSPORT.STREAMING) { // IE8 requires a longer padding to work properly if the - // initial message is small (#11573) - resource.padding(LONG_PADDING); + // initial message is small (#11573). Chrome does not work + // without the original padding... + WebBrowser browser = session.getBrowser(); + if (browser.isIE() && browser.getBrowserMajorVersion() == 8) { + resource.padding(LONG_PADDING); + } } resource.suspend(); -- cgit v1.2.3