对于大文件(25MB),LimitRequestBody 不响应 413 [英] LimitRequestBody doesn't respond with 413 for large file(25MB)

查看:52
本文介绍了对于大文件(25MB),LimitRequestBody 不响应 413的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我放入了我的虚拟主机文件:

I put inside my virtual host file:

LimitRequestBody 1024

限制上传大小.当我上传 100kB 到 7MB 的文件时,我得到 413 响应,但是当我尝试 25MB 文件时,我得到连接已重置.页面加载时与服务器的连接已重置"而不是 413

to limit the upload size. When i upload files of 100kB up to 7MB i get a 413 Response, but when i try a 25MB file I get "The connection was reset. The connection to the server was reset while the page was loading" instead of 413

有谁知道为什么会发生这种情况?

Does anyone know why this would happen?

顺便说一句,我正在使用 mod_wsgi 和 apache

btw, i'm using mod_wsgi with apache

推荐答案

很可能是因为较大的大小意味着 HTTP 客户端超过了套接字缓冲区的大小,因此在写入时被阻止并在写入时检测到一个关闭的连接,甚至在它决定开始之前读取来自服务器的响应.

Most likely because the larger size meant HTTP client exceeded socket buffer sizes and so was blocked on writing and detected a closed connection on the write before it even decided to start reading the response from the server.

这篇关于对于大文件(25MB),LimitRequestBody 不响应 413的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆