forked from I2P_Developers/i2p.i2p
Console: Fix gzip enable logic
Don't compress js Set charset for war resources
This commit is contained in:
@ -377,8 +377,16 @@ class BasicServlet extends HttpServlet
|
||||
protected void writeHeaders(HttpServletResponse response,HttpContent content,long count)
|
||||
throws IOException
|
||||
{
|
||||
if (content.getContentType()!=null && response.getContentType()==null)
|
||||
response.setContentType(content.getContentType());
|
||||
String rtype = response.getContentType();
|
||||
String ctype = content.getContentType();
|
||||
if (rtype != null) {
|
||||
if (rtype.equals("application/javascript"))
|
||||
response.setCharacterEncoding("ISO-8859-1");
|
||||
} else if (ctype != null) {
|
||||
response.setContentType(ctype);
|
||||
if (ctype.equals("application/javascript"))
|
||||
response.setCharacterEncoding("ISO-8859-1");
|
||||
}
|
||||
response.setHeader("X-Content-Type-Options", "nosniff");
|
||||
long lml = content.getLastModified();
|
||||
if (lml > 0)
|
||||
|
Reference in New Issue
Block a user