From c701b1291c79d8aacd10e7cc5b3ccd3c0fa3bbc9 Mon Sep 17 00:00:00 2001 From: wentch <22250530@qq.com> Date: Wed, 20 Jan 2016 15:59:05 +0800 Subject: [PATCH] --- src/org/redkale/net/http/HttpRequest.java | 1 + 1 file changed, 1 insertion(+) 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();