File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/main/java/org/wltea/analyzer/dic Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 31
31
</parent >
32
32
33
33
<properties >
34
- <elasticsearch .version>1.6.0 </elasticsearch .version>
34
+ <elasticsearch .version>1.6.2 </elasticsearch .version>
35
35
</properties >
36
36
37
37
<repositories >
Original file line number Diff line number Diff line change @@ -62,15 +62,15 @@ public void run() {
62
62
response = httpclient .execute (head );
63
63
64
64
//返回200 才做操作
65
- if (response .getStatusLine ().getStatusCode ()==200 ){
65
+ if (response .getStatusLine ().getStatusCode ()==200 || response . getStatusLine (). getStatusCode ()== 304 ){
66
66
67
67
if (!response .getLastHeader ("Last-Modified" ).getValue ().equalsIgnoreCase (last_modified )
68
- ||!response .getLastHeader ("ETags " ).getValue ().equalsIgnoreCase (eTags )) {
68
+ ||!response .getLastHeader ("ETag " ).getValue ().equalsIgnoreCase (eTags )) {
69
69
70
70
// 远程词库有更新,需要重新加载词典,并修改last_modified,eTags
71
71
Dictionary .getSingleton ().reLoadMainDict ();
72
72
last_modified = response .getLastHeader ("Last-Modified" )==null ?null :response .getLastHeader ("Last-Modified" ).getValue ();
73
- eTags = response .getLastHeader ("ETags " )==null ?null :response .getLastHeader ("ETags " ).getValue ();
73
+ eTags = response .getLastHeader ("ETag " )==null ?null :response .getLastHeader ("ETag " ).getValue ();
74
74
}
75
75
}else {
76
76
Dictionary .logger .info ("remote_ext_dict {} return bad code {}" , location , response .getStatusLine ().getStatusCode () );
You can’t perform that action at this time.
0 commit comments