From 729f1efd8998d875cae64f7894fc5e0e62fded9e Mon Sep 17 00:00:00 2001 From: Loredana Crusoveanu Date: Thu, 26 Jul 2018 22:35:35 +0300 Subject: [PATCH] Update PushController.java --- .../com/baeldung/spring/controller/push/PushController.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spring-mvc-simple/src/main/java/com/baeldung/spring/controller/push/PushController.java b/spring-mvc-simple/src/main/java/com/baeldung/spring/controller/push/PushController.java index b557c65c93..88448d4885 100644 --- a/spring-mvc-simple/src/main/java/com/baeldung/spring/controller/push/PushController.java +++ b/spring-mvc-simple/src/main/java/com/baeldung/spring/controller/push/PushController.java @@ -11,9 +11,7 @@ public class PushController { @GetMapping(path = "/demoWithPush") public String demoWithPush(PushBuilder pushBuilder) { if (null != pushBuilder) { - pushBuilder.path("resources/logo.png") - .addHeader("Content-Type", "image/png") - .push(); + pushBuilder.path("resources/logo.png").push(); } return "demo"; } @@ -22,4 +20,4 @@ public class PushController { public String demoWithoutPush() { return "demo"; } -} \ No newline at end of file +}