fix/upload-size-check #7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/upload-size-check"
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?
Content-Lengthheader check in the upload handler: rejects obviously oversized requests before reading asingle byte of the body
await file.read()with an 8 KB chunked read loop that aborts as soon as the accumulated buffer exceedsmax_upload_size, preventing the full body from ever being buffered in memorymax_upload_sizesetting and return the same HTTP 413 responsePreviously a client could force the server to allocate up to 5 MB of memory per request regardless of the configured
cap, since the size check only fired after the full body was already in memory.