Correct a bug to effectively show the 413 error page.
What was the bug?
When a 413 error happen (ie when the size of the file sent to the server is greater than 5Mio), django was supposed to handle the error and show a custom page explaining to the user what was the problem. However, the file size limit is not defined in django but in nginx, so the custom page was not displayed.
How did we correct it?
Define the custome page for the error 413 in nginx directly and not in django.
Tests
To see the page, try to send a file which is heavier than 5Mio.
Description
Correct a bug to effectively show the 413 error page.
What was the bug? When a 413 error happen (ie when the size of the file sent to the server is greater than 5Mio), django was supposed to handle the error and show a custom page explaining to the user what was the problem. However, the file size limit is not defined in django but in nginx, so the custom page was not displayed.
How did we correct it? Define the custome page for the error 413 in nginx directly and not in django.
Tests
To see the page, try to send a file which is heavier than 5Mio.
Screenshots