summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKatriHaapalinna <katri@vaadin.com>2018-02-13 15:42:06 +0200
committerIlia Motornyi <elmot@vaadin.com>2018-02-13 15:42:06 +0200
commit33647404e97b80bc12c7fde76d23ea4abe97bf4f (patch)
treef226e968cc3a5259cd3a13f07687c28ae901e88a
parenta30f74592ac2e84f687f95a84c7e4554719a5019 (diff)
downloadvaadin-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.java2
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) {