From f9c829f7cc367fd99d8f673e6581a7548f60e519 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Fri, 20 Jan 2017 11:38:21 +1100 Subject: [PATCH] Issue #1269 report inferred encoding --- .../src/main/java/org/eclipse/jetty/server/Response.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/Response.java b/jetty-server/src/main/java/org/eclipse/jetty/server/Response.java index c9ea89a5976..1b256d78584 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/Response.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/Response.java @@ -839,6 +839,9 @@ public class Response implements HttpServletResponse if (_characterEncoding == null) { String encoding = MimeTypes.getCharsetAssumedFromContentType(_contentType); + if (encoding!=null) + return encoding; + encoding = MimeTypes.getCharsetInferredFromContentType(_contentType); if (encoding!=null) return encoding; return StringUtil.__ISO_8859_1;