Copilot review (PR #4, commit 489abc8, src/httpd.erl:329-331).
The code explicitly defers proper connection negotiation:
%% NOTE: HTTP/1.0 default-close and Connection: close semantics are not yet
%% implemented; that negotiation is deferred to a follow-up. Handlers that
%% need to force a close should return {close, ...} instead.
{reply, ...} responses always keep the connection open regardless of the request's HTTP version or a Connection: close header. To be spec-compliant the server should:
- close after the response for HTTP/1.0 unless
Connection: keep-alive,
- close when the client sends
Connection: close,
- otherwise keep-alive for HTTP/1.1.
The version field and lowercase header normalization are already in place, so the inputs needed for an is_keep_alive/1 helper exist.
Validated against current code: deferred / not yet implemented.
Copilot review (PR #4, commit 489abc8,
src/httpd.erl:329-331).The code explicitly defers proper connection negotiation:
{reply, ...}responses always keep the connection open regardless of the request's HTTP version or aConnection: closeheader. To be spec-compliant the server should:Connection: keep-alive,Connection: close,The
versionfield and lowercase header normalization are already in place, so the inputs needed for anis_keep_alive/1helper exist.Validated against current code: deferred / not yet implemented.