From 41884ff2f4f19a4b2a05a3bbe4b8e6c0043fd9d9 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 4 Oct 2018 18:47:29 +0300 Subject: Fix content negotiation --- .../src/main/java/com/juick/server/www/controllers/MessagesWWW.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'juick-server/src/main/java/com/juick/server/www/controllers') diff --git a/juick-server/src/main/java/com/juick/server/www/controllers/MessagesWWW.java b/juick-server/src/main/java/com/juick/server/www/controllers/MessagesWWW.java index 3f13b6bb..0708e27f 100644 --- a/juick-server/src/main/java/com/juick/server/www/controllers/MessagesWWW.java +++ b/juick-server/src/main/java/com/juick/server/www/controllers/MessagesWWW.java @@ -31,6 +31,7 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.text.StringEscapeUtils; import org.springframework.context.ApplicationEventPublisher; import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; @@ -483,7 +484,7 @@ public class MessagesWWW { model.addAttribute("uname", uname); return "views/pm_sent"; } - @GetMapping("/{uname}/{mid}") + @GetMapping(value = "/{uname}/{mid}", produces = MediaType.TEXT_HTML_VALUE) protected String threadAction(ModelMap model, @PathVariable String uname, @PathVariable int mid, -- cgit v1.2.3