Skip to content

Refactor code structure for better readability and maintainability#5

Merged
mikecovlee merged 5 commits into
masterfrom
full_http_compliance
Jul 16, 2026
Merged

Refactor code structure for better readability and maintainability#5
mikecovlee merged 5 commits into
masterfrom
full_http_compliance

Conversation

@mikecovlee

Copy link
Copy Markdown
Member

No description provided.

- Added timeout checks before reading HTTP headers and body to prevent dangling async operations during shutdown.
- Improved error response handling to ensure proper framing in multi-process mode.
- Introduced a new method to check if the peer has closed the connection in the network layer.
- Refactored HTTP response reading logic to handle peer closure and ensure compliance with Content-Length.
- Updated tests to verify that original status codes are preserved and that responses are correctly handled in various scenarios.
…agement

- Added "X-Forwarded-For" header to requests to forward the real client IP address.
- Updated hop-by-hop headers to include "x-forwarded-for".
- Implemented logic to set "Connection: close" in responses when keep-alive is disabled, ensuring proper connection lifecycle management.
@mikecovlee
mikecovlee merged commit 1e32441 into master Jul 16, 2026
6 checks passed
@mikecovlee
mikecovlee deleted the full_http_compliance branch July 16, 2026 03:24
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