This commit is contained in:
@@ -148,6 +148,7 @@ public class HttpRequest extends Request<HttpContext> {
|
|||||||
if (this.contentType != null && this.contentType.contains("boundary=")) {
|
if (this.contentType != null && this.contentType.contains("boundary=")) {
|
||||||
this.boundary = true;
|
this.boundary = true;
|
||||||
}
|
}
|
||||||
|
if(this.boundary) this.keepAlive = false; //文件上传必须设置keepAlive为false,因为文件过大时用户不一定会skip掉多余的数据
|
||||||
if (this.contentLength > 0 && (this.contentType == null || !this.boundary)) {
|
if (this.contentLength > 0 && (this.contentType == null || !this.boundary)) {
|
||||||
if (this.contentLength > context.getMaxbody()) return -1;
|
if (this.contentLength > context.getMaxbody()) return -1;
|
||||||
int lr = (int) this.contentLength - array.count();
|
int lr = (int) this.contentLength - array.count();
|
||||||
|
|||||||
Reference in New Issue
Block a user