mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-30 04:45:55 +08:00
add commnet
This commit is contained in:
parent
377cd55a3c
commit
e557cfd4b7
@ -420,6 +420,7 @@ public class HttpResponse extends HttpBase<HttpResponse> implements Closeable {
|
||||
try {
|
||||
IoUtil.copy(in, out);
|
||||
} catch (IORuntimeException e) {
|
||||
//noinspection StatementWithEmptyBody
|
||||
if (e.getCause() instanceof EOFException || StrUtil.containsIgnoreCase(e.getMessage(), "Premature EOF")) {
|
||||
// 忽略读取HTTP流中的EOF错误
|
||||
} else {
|
||||
@ -447,6 +448,7 @@ public class HttpResponse extends HttpBase<HttpResponse> implements Closeable {
|
||||
try {
|
||||
this.readBody(this.in);
|
||||
} catch (IORuntimeException e) {
|
||||
//noinspection StatementWithEmptyBody
|
||||
if (e.getCause() instanceof FileNotFoundException) {
|
||||
// 服务器无返回内容,忽略之
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user