Copilot review (PR #4, commit aae97d1, src/httpd.erl:461-467).
parse_heading/4 accumulates the version chars and on $\n tries to strip a leading \r, but the CR is trailing ("HTTP/1.1\r\n"):
Version = case RawVersion of
[$\r | Clean] -> list_to_binary(Clean); %% never matches
_ -> list_to_binary(RawVersion) %% keeps trailing \r
end,
Result: version is stored as <<"HTTP/1.1\r">> (verified on host OTP). This breaks any later version comparison/logging.
Fix: strip the trailing \r (e.g. string:trim/1 or drop the last char when it is $\r).
Validated against current code: still present.
Copilot review (PR #4, commit aae97d1,
src/httpd.erl:461-467).parse_heading/4accumulates the version chars and on$\ntries to strip a leading\r, but the CR is trailing ("HTTP/1.1\r\n"):Result:
versionis stored as<<"HTTP/1.1\r">>(verified on host OTP). This breaks any later version comparison/logging.Fix: strip the trailing
\r(e.g.string:trim/1or drop the last char when it is$\r).Validated against current code: still present.