diff options
author | KatriHaapalinna <katri@vaadin.com> | 2018-02-13 15:42:06 +0200 |
---|---|---|
committer | Ilia Motornyi <elmot@vaadin.com> | 2018-02-28 12:55:15 +0300 |
commit | 3d4975c0ea18f0f1a1c022ea2b3128c1653edd94 (patch) | |
tree | aa65961fa6f4525669fa600f9bef85326cc31fa4 | |
parent | e0e6fc4cf41c7a031f140b9a8bfd8c0ba5fec7e6 (diff) | |
download | vaadin-framework-3d4975c0ea18f0f1a1c022ea2b3128c1653edd94.tar.gz vaadin-framework-3d4975c0ea18f0f1a1c022ea2b3128c1653edd94.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) { |