Skip to content

Commit 5a1b8c8

Browse files
authored
Read chunked remote words (infinilabs#817)
Fix chunked content could not be read as it will not get content length I see there is an issue infinilabs#780 and this fix it
1 parent 1375ca6 commit 5a1b8c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/wltea/analyzer/dic/Dictionary.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ private static List<String> getRemoteWordsUnprivileged(String location) {
469469
}
470470
}
471471

472-
if (entity.getContentLength() > 0) {
472+
if (entity.getContentLength() > 0 || entity.isChunked()) {
473473
in = new BufferedReader(new InputStreamReader(entity.getContent(), charset));
474474
String line;
475475
while ((line = in.readLine()) != null) {

0 commit comments

Comments
 (0)