The culprit:
|
(when (not= (:method ctx) :head) |
|
(when-let [cl (body/content-length body)] |
|
{"content-length" (str cl)})) |
Why it's incorrect: https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.2
A server MAY send a Content-Length header field in a 304 (Not
Modified) response to a conditional GET request (Section 4.1 of
[RFC7232]); a server MUST NOT send Content-Length in such a response
unless its field-value equals the decimal number of octets that would
have been sent in the payload body of a 200 (OK) response to the same
request.