Skip to content

Enforce strict content-length validation; update documentation#15

Merged
szeka9 merged 7 commits into
mainfrom
development
May 31, 2026
Merged

Enforce strict content-length validation; update documentation#15
szeka9 merged 7 commits into
mainfrom
development

Conversation

@szeka9
Copy link
Copy Markdown
Owner

@szeka9 szeka9 commented May 31, 2026

This pull request delivers bug fixes and hardenings before the v0.7.0 release, as well as improved documentation and test coverage for file serving use cases.

szeka9 added 7 commits May 30, 2026 22:36
Add documentation about state-machine-based FSM
parsing.

Add reference to file management API in the configuration
description.
Reject requests with HTTP 400 when a body
is present in a GET request.

Ensure that no body is sent in response to
HEAD requests.

Update docstrings and add inline comments
for clarifciation about state machine behavior.
- add helper for incrementing content-length counter
and validation, replacing individual content-length
validation checks

- add note about limitation in multipart parser,
not supporting chunked encoding, preamble, and epilogue
sections

- add new test cases covering various edge cases
for content-length validation

- fix invalid content-length in test_http_file_server.py

- fix the handling of trailing CRLF after closing boundary
delimiter in multipart parsing; allow CRLF optionally
_TMP_DIR is normalized multiple times
in the file server module, causing test
failures when CWD is not the root directory.
Add examples based on curl for trying
/files from a terminal.
Refinements:
- enable garbage collection
- rename test for bulk file uploads
- separate functional tests based on
feature flags

New tests:
- test if bulk upload works by validating
uploaded files
- test file access control enforced
by the /files API
@szeka9 szeka9 merged commit 7f84e93 into main May 31, 2026
1 check passed
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.

1 participant