Skip to content

Commit

Permalink
Read chunked remote words (#817)
Browse files Browse the repository at this point in the history
Fix chunked content could not be read as it will not get content length
I see there is an issue #780 and this fix it
  • Loading branch information
shoukunhuai committed Sep 6, 2020
1 parent 1375ca6 commit 5a1b8c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/wltea/analyzer/dic/Dictionary.java
Expand Up @@ -469,7 +469,7 @@ private static List<String> getRemoteWordsUnprivileged(String location) {
}
}

if (entity.getContentLength() > 0) {
if (entity.getContentLength() > 0 || entity.isChunked()) {
in = new BufferedReader(new InputStreamReader(entity.getContent(), charset));
String line;
while ((line = in.readLine()) != null) {
Expand Down

0 comments on commit 5a1b8c8

Please sign in to comment.