Skip to content

Add test coverage for request_timeout closing stalled requests #10

Description

@harmon25

Copilot review (PR #4, commit 489abc8, src/httpd.erl).

Request timeouts are implemented via the recv_timeout socket option mapped to handle_timeout/1 (closes a connection with a buffered partial request). There is currently no test asserting this behavior.

Fix: add an integration test that starts the server with a small request_timeout, sends a partial request (e.g. headers without the full body, or a truncated request line), and verifies the socket is closed after the timeout — while confirming an idle keep-alive/WebSocket connection is NOT closed.

Validated against current code: no such test exists in test/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions