Skip to content

[AI] Fix multipart memory limit for buffered files#1522

Open
puneetdixit200 wants to merge 1 commit into
bottlepy:masterfrom
puneetdixit200:ai-fix-multipart-mem-limit
Open

[AI] Fix multipart memory limit for buffered files#1522
puneetdixit200 wants to merge 1 commit into
bottlepy:masterfrom
puneetdixit200:ai-fix-multipart-mem-limit

Conversation

@puneetdixit200

Copy link
Copy Markdown

Fixes #1470.

This keeps MEMFILE_MAX as the per-file in-memory threshold for multipart uploads, but stops reusing that same 100 KiB value as the parser-wide total memory limit. The parser now uses its existing larger total-memory default while each individual file part still spools to disk once it exceeds MEMFILE_MAX.

I manually reviewed the diff and verified the regression path with:

  • python3 -m unittest test.test_environ.TestRequest.test_multipart_many_small_files_above_memfile_total
  • python3 -m unittest test.test_environ test.test_multipart
  • python3 -m unittest discover -t . -s test
  • git diff --check HEAD~1..HEAD

AI disclosure: assisted by OpenAI GPT-5. I reviewed the change and test output before submitting.

License: I explicitly license this contribution as public domain.

Allow multipart parsing to keep the existing per-file memory threshold without using that same threshold as the total parser memory limit.

Fixes bottlepy#1470

ai-assisted-by: OpenAI GPT-5

License: Public Domain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New MultipartParser fails on files above 102400 bytes

1 participant