Skip to content

Fix keep-alive for static content; refactor multipart module and class attributes#24

Merged
szeka9 merged 5 commits into
mainfrom
development
Jun 27, 2026
Merged

Fix keep-alive for static content; refactor multipart module and class attributes#24
szeka9 merged 5 commits into
mainfrom
development

Conversation

@szeka9

@szeka9 szeka9 commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Additionally, add default cache-control policy, and introduce HTTP 415 response status.

szeka9 added 5 commits June 21, 2026 19:20
Use `cache-control: no-store` unless
overridden by the user application.

The server does not currently implement
cache-validation or conditional request
mechanisms. Disabling client-side caching
avoids stale content and provides
deterministic behavior during development
and deployment.
Examples and user applications require
415 (Unsupported Media Type) for
incompatible requests.
Decouple state machine extensions from the
HTTP parser class by storing additional properties
in a dictionary with lazy initialization.

Move boundary parsing to the multipart parser
module and always compute boundary delimiters
from the stored boundary property instead of
storing them as standalone properties.
Remove exception messages used for
troubleshooting, and disambiguate
response messages used by the file
server API.
'Connection: keep-alive' was not working for static
file serving because of the missing update of the
HttpEngine._is_req_complete property. The aforementioned
property controls early socket closure when the indicated
payload size does not match the content length.
@szeka9 szeka9 merged commit f6c88ee into main Jun 27, 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