Merge pull request #87 from shikui/patch-1

处理 HTTP 304,不写日志
This commit is contained in:
Medcl 2015-08-12 10:43:58 +08:00
commit 2b13e2a42e

View File

@ -72,6 +72,9 @@ public class Monitor implements Runnable {
last_modified = response.getLastHeader("Last-Modified")==null?null:response.getLastHeader("Last-Modified").getValue(); last_modified = response.getLastHeader("Last-Modified")==null?null:response.getLastHeader("Last-Modified").getValue();
eTags = response.getLastHeader("ETag")==null?null:response.getLastHeader("ETag").getValue(); eTags = response.getLastHeader("ETag")==null?null:response.getLastHeader("ETag").getValue();
} }
}else if (response.getStatusLine().getStatusCode()==304) {
//没有修改不做操作
//noop
}else{ }else{
Dictionary.logger.info("remote_ext_dict {} return bad code {}" , location , response.getStatusLine().getStatusCode() ); Dictionary.logger.info("remote_ext_dict {} return bad code {}" , location , response.getStatusLine().getStatusCode() );
} }