diff --git a/src/main/java/com/alibaba/druid/support/http/ResourceServlet.java b/src/main/java/com/alibaba/druid/support/http/ResourceServlet.java index b8551dbfb2..cbe2cde756 100644 --- a/src/main/java/com/alibaba/druid/support/http/ResourceServlet.java +++ b/src/main/java/com/alibaba/druid/support/http/ResourceServlet.java @@ -155,6 +155,10 @@ public abstract class ResourceServlet extends HttpServlet { IOException { String filePath = getFilePath(fileName); + + if (filePath.endsWith(".html")) { + response.setContentType("text/html; charset=utf-8"); + } if (fileName.endsWith(".jpg")) { byte[] bytes = Utils.readByteArrayFromResource(filePath); if (bytes != null) {