v1.0.4
Added
nhttp_h1:encode_response/2takest:nhttp_h1:enc_opts/0.
#{content_length => omit}suppresses the automaticContent-Length
field. A server that answers aCONNECTrequest with a 2xx status uses
it, because RFC 9110 Section 8.6 forbids the field there and the response
map carries no request method
Fixed
nhttp_h1:encode_response/1emitsContent-Length: 0on a response with
an empty body. The call omitted the field before, so a client on a
persistent connection read the next response as contentnhttp_h1:encode_response/1emits noContent-Lengthat a 1xx, 204, or
304 status (RFC 9110 Section 8.6). At 304 the field is valid only at the
length that a 200 response carries, which the encoder cannot compute, so a
caller that knows the value supplies it in the header list
Full Changelog: 1.0.3...v1.0.4