Problem
I want to restrict the file sizes uploaded to my application server.
But entity to large message comes after uploading completed.
For example my nginx config is like the following
http { client_max_body_size 6M;}
When the request is greater than 6MB,I expect http 413 status code, but
I am trying to uploading a 2 GB file.
after the upload is fully(2GB) completed,the gives a message '413 entity to large'.
In addition also as soon as the request came nginx, writed a message to error.log file like below
client intended to send too large body: 2031304213 bytes
but client http response comes after the file is fully loaded.
What is my fault ? Thanks