diff options
author | KatriHaapalinna <katri@vaadin.com> | 2018-02-13 15:42:06 +0200 |
---|---|---|
committer | Ilia Motornyi <elmot@vaadin.com> | 2018-02-13 15:42:06 +0200 |
commit | 33647404e97b80bc12c7fde76d23ea4abe97bf4f (patch) | |
tree | f226e968cc3a5259cd3a13f07687c28ae901e88a | |
parent | a30f74592ac2e84f687f95a84c7e4554719a5019 (diff) | |
download | vaadin-framework-33647404e97b80bc12c7fde76d23ea4abe97bf4f.tar.gz vaadin-framework-33647404e97b80bc12c7fde76d23ea4abe97bf4f.zip |
Add Content-Type with charset to notifications sent via Push
Fixes #9922
-rw-r--r-- | server/src/main/java/com/vaadin/server/communication/PushHandler.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/server/src/main/java/com/vaadin/server/communication/PushHandler.java b/server/src/main/java/com/vaadin/server/communication/PushHandler.java index 08e0d798bc..6591596a47 100644 --- a/server/src/main/java/com/vaadin/server/communication/PushHandler.java +++ b/server/src/main/java/com/vaadin/server/communication/PushHandler.java @@ -41,6 +41,7 @@ import com.vaadin.server.VaadinServletRequest; import com.vaadin.server.VaadinServletService; import com.vaadin.server.VaadinSession; import com.vaadin.shared.ApplicationConstants; +import com.vaadin.shared.JsonConstants; import com.vaadin.shared.communication.PushMode; import com.vaadin.ui.UI; @@ -467,6 +468,7 @@ public class PushHandler { "sendNotificationAndDisconnect called for resource no longer in scope"); return; } + resource.getResponse().setContentType(JsonConstants.JSON_CONTENT_TYPE); resource.getResponse().getWriter().write(notificationJson); resource.resume(); } catch (Exception e) { |