summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2013-05-30 16:04:33 +0300
committerArtur Signell <artur@vaadin.com>2013-05-30 16:29:16 +0300
commit5e26b0b6d9c97210d97e3e81f1af33feaa4751eb (patch)
tree8b0b2f4161be4ac98c70970a0d42ba20b21fcb50 /server
parent29fcadc569c7e45c7d913b18469fbe55b9b7adc3 (diff)
downloadvaadin-framework-5e26b0b6d9c97210d97e3e81f1af33feaa4751eb.tar.gz
vaadin-framework-5e26b0b6d9c97210d97e3e81f1af33feaa4751eb.zip
Fix streaming issue with iOS6 (#11934)
It appears that iOS6 will not make new request (at least for images) to a server to which there is already a connection open which possibly will be kept alive after the current request is done (Connection: Keep-alive asked by the client and not denied by the server) Change-Id: If4e6233457fced3760a931b7953fa1713fee3452
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/server/communication/PushHandler.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/src/com/vaadin/server/communication/PushHandler.java b/server/src/com/vaadin/server/communication/PushHandler.java
index 37adc1a108..a44df79221 100644
--- a/server/src/com/vaadin/server/communication/PushHandler.java
+++ b/server/src/com/vaadin/server/communication/PushHandler.java
@@ -84,6 +84,13 @@ public class PushHandler implements AtmosphereHandler {
if (browser.isIE() && browser.getBrowserMajorVersion() == 8) {
resource.padding(LONG_PADDING);
}
+
+ // Must ensure that the streaming response contains
+ // "Connection: close", otherwise iOS 6 will wait for the
+ // response to this request before sending another request to
+ // the same server (as it will apparently try to reuse the same
+ // connection)
+ resource.getResponse().addHeader("Connection", "close");
}
String requestToken = resource.getRequest().getParameter(