Incorrect file size check leads to confusing error message on status code 413 page #85
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: mia/0x0#85
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Error page shows a quite confusing and wrong text like:
512.0 MiB > 512.0 MiB
in case the uploaded file's size is equal to the file size limit.Upload file size check on the backend assures the file size is less than
MAX_CONTENT_LENGTH
, but on the 413 page text clearly states thatcontent-length
is greater thanMAX_CONTENT_LENGTH
which is not true in case ifcontent-length
is equal toMAX_CONTENT_LENGTH
. Also this prevents uploading files that are equal to the file size limit, which is wrong in my opinion.File size check:
Status code 413 template:
I think the best way to resolve this issue would be to change the check to use
<=
operator instead of<
.Incorrect file size check leads to confusing error on status code 413 pageto Incorrect file size check leads to confusing error message on status code 413 pageOops, you’re right 😅