diff --git a/src/org/redkale/net/http/HttpRequest.java b/src/org/redkale/net/http/HttpRequest.java index 3a14c56e9..b9d4b193c 100644 --- a/src/org/redkale/net/http/HttpRequest.java +++ b/src/org/redkale/net/http/HttpRequest.java @@ -148,6 +148,7 @@ public class HttpRequest extends Request { if (this.contentType != null && this.contentType.contains("boundary=")) { this.boundary = true; } + if(this.boundary) this.keepAlive = false; //文件上传必须设置keepAlive为false,因为文件过大时用户不一定会skip掉多余的数据 if (this.contentLength > 0 && (this.contentType == null || !this.boundary)) { if (this.contentLength > context.getMaxbody()) return -1; int lr = (int) this.contentLength - array.count();