0

Consider a POST request, sending a big file. At some point - either after reading Content-Length or during reading the body, if chunked transfer - the server decides that the body length is too big.

According to http, the server should reply with 413 Payload Too Large. But in order to reply, the server has to read the whole POST request first, at least AFAIK it would break browser else and show cryptic error messages.

So where is the point then in 413 Payload Too Large if I anyway need to read the whole request in order to reply?

I am aware of the "option" to read the POST request to the end while discarding everything and then replying 413 Payload Too Large, but yeah that is kinda not an option keeping server busy for nothing...

So closing the connection without replying is basically the best I can do right?

4

0 に答える 0