fixed bug for monitor web set contentType

This commit is contained in:
高铁
2016-02-28 21:51:29 +08:00
parent f5924d2661
commit d0cf3614e3
@@ -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) {