LimitRequestBody doesn't respond with 413 for

2019-09-09 09:03发布

问题:

I put inside my virtual host file:

LimitRequestBody 1024

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?

btw, i'm using mod_wsgi with apache

回答1:

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.