aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorJohannes Dahlström <johannesd@vaadin.com>2013-07-09 12:03:30 +0300
committerJohannes Dahlström <johannesd@vaadin.com>2013-07-09 12:03:30 +0300
commit6a4bbe52c399c58d43d7f81f322fe8b090df6921 (patch)
tree9e231931a5a26adee9da4567eb3c0d7572e1f6dc /server
parent775c9693e0778894498ff45cac4512fa69e8cb3d (diff)
downloadvaadin-framework-6a4bbe52c399c58d43d7f81f322fe8b090df6921.tar.gz
vaadin-framework-6a4bbe52c399c58d43d7f81f322fe8b090df6921.zip
Set heartbeat response Content-Type to text/plain (#12182)
By default browsers assume text/html and may complain about an empty response body. Change-Id: I66ed1aef3421a7f0a618bc441ffab1dc0efbdc71
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/server/communication/HeartbeatHandler.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/com/vaadin/server/communication/HeartbeatHandler.java b/server/src/com/vaadin/server/communication/HeartbeatHandler.java
index 16c21224ab..4c95859203 100644
--- a/server/src/com/vaadin/server/communication/HeartbeatHandler.java
+++ b/server/src/com/vaadin/server/communication/HeartbeatHandler.java
@@ -63,6 +63,9 @@ public class HeartbeatHandler extends SynchronizedRequestHandler implements
// Ensure that the browser does not cache heartbeat responses.
// iOS 6 Safari requires this (#10370)
response.setHeader("Cache-Control", "no-cache");
+ // If Content-Type is not set, browsers assume text/html and may
+ // complain about the empty response body (#12182)
+ response.setHeader("Content-Type", "text/plain");
} else {
response.sendError(HttpServletResponse.SC_NOT_FOUND, "UI not found");
}