You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please, can anyone say how to avoid the following behavior?
For example, we send a large HTTP POST request with multipart/form-data (~2 Gb) using channels, daphne, AsgiHandler and AsgiRequest. (let's say we chose the wrong file to upload).
Please, can anyone say how to avoid the following behavior?
For example, we send a large HTTP POST request with multipart/form-data (~2 Gb) using channels, daphne,
AsgiHandler
andAsgiRequest
. (let's say we chose the wrong file to upload).settings.py contains
DATA_UPLOAD_MAX_MEMORY_SIZE = 1024 * 1024 * 25
andFILE_UPLOAD_MAX_MEMORY_SIZE = 1024 * 1024 * 5
settings.Here in
AsgiRequest
we raiseRequestDataTooBig
exception.So the response is
HttpResponse("413 Payload too large", status=413)
(here). Ok.But before all this: here we load two gigabytes of unwanted data into RAM... ?
Perhaps is there a way to check the
content-length
in the__init__
method ofAsgiHandler
? How to prevent uploads to RAM correctly?The text was updated successfully, but these errors were encountered: