Skip to content

Refactor early termination behavior and multipart response generation; add minor improvements#21

Merged
szeka9 merged 4 commits into
mainfrom
development
Jun 14, 2026
Merged

Refactor early termination behavior and multipart response generation; add minor improvements#21
szeka9 merged 4 commits into
mainfrom
development

Conversation

@szeka9

@szeka9 szeka9 commented Jun 14, 2026

Copy link
Copy Markdown
Owner

No description provided.

szeka9 added 4 commits June 14, 2026 17:59
Rename `get_url_encoded_query_param` to
`get_query_param` and make it an instance method
to simplify the usage.
Handle early termination requested by the user application when
processing chunked or multipart requests. Stop processing the
payload immediately when the state machine is terminated by the
routing handler.

Restructure route handler for file uploads, and create a helper
function for identifying multipart requests. Move path validation
logic to the beginning.
Convert `generate_multipart_response()` from a
state-machine state into a helper function.

The previous design required wrapper lambdas to
adapt multipart response generation to the state
handler interface, which expects only an `rx`
argument.

By moving multipart generation into a helper,
applications can invoke it directly without
returning an additional callback.

This also unifies multipart route responses and
early state machine termination under the same
response handling path, eliminating ambiguous
state transitions.
Reject file paths with a trailing /
character, create tests for the validation
function and the file server module.
@szeka9 szeka9 merged commit 64c2ed2 into main Jun 14, 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