gzip修正
@@ -54,8 +54,7 @@ | ||
54 | 54 | String LastMod = editTimeZone(res.getLastModified()); |
55 | 55 | if(res.getStatusCore() == 200) { |
56 | 56 | resStr += "HTTP/1.1 200 OK\r\n"; |
57 | - | |
58 | - if(useGzip) { | |
57 | + if(useGzip && (ext.equals("html") || ext.equals("htm")|| ext.equals("do"))) { | |
59 | 58 | try { |
60 | 59 | ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
61 | 60 | GZIPOutputStream gos = new GZIPOutputStream(baos); |
@@ -71,6 +70,8 @@ | ||
71 | 70 | ioe.printStackTrace(); |
72 | 71 | useGzip = false; |
73 | 72 | } |
73 | + } else { | |
74 | + useGzip = false; | |
74 | 75 | } |
75 | 76 | |
76 | 77 | } else if(res.getStatusCore() == 201) { |