BUG/MINOR: mux-h2: don't reject an empty DATA frame ending a bodyless response
On the backend side, a HEAD response (or a 204/304) may announce a
content-length and be ended by an empty DATA frame with the END_STREAM
flag. It is valid (RFC 9113 #8.1.1). But h2c_handle_data() reported "ES
on DATA frame before content-length" in this case: the stream was reset
with a PROTOCOL_ERROR, a glitch was counted and the stream protocol
errors counter was incremented. The response itself was properly
forwarded because h2_frt_transfer_data() already handled this case.
However, with "tune.h2.be.glitches-threshold", a compliant server could
lose its connection.
Now, like for the END_STREAM flag on the HEADERS frame, the content-length
check is skipped for bodyless responses on the backend side.
The reg-test http_bodyless_response.vtc was extended to check the stream
protocol errors counter of the H2 backend. The HEAD responses received from
the H2 server were already in this case.
This patch should be backported to all stable versions.