BUG/MINOR: mux-quic: fix transfer of empty HTTP response
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 10 Jan 2023 09:41:41 +0000 (10:41 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 10 Jan 2023 15:44:53 +0000 (16:44 +0100)
commitab6cdecd712b31bb17ebb2f23d390e5b59359f4a
tree29acfa120cbd8943c418205f43f5ede532caa781
parentf29c4155a81dd58dcdc95f2212d665a5096a205a
BUG/MINOR: mux-quic: fix transfer of empty HTTP response

QUIC stream did not transferred its response if it was an empty HTTP
response without headers nor entity body. This is caused by an
incomplete condition on qc_send() which skips streams with empty
<tx.buf>.

Fix this by extending the condition. Sending will be conducted on a
stream if <tx.buf> is not empty or FIN notification must be provided.
This allows to send the last STREAM frame for this stream.

Such HTTP responses should be extremely rare so this bug is labelled as
MINOR. It was encountered with a HTTP/0.9 request on an empty payload.
The bug was triggered as HTTP/0.9 does not support header in response
message.

Also, note that condition to wakeup MUX tasklet has been changed
similarly in qc_send_buf(). It is not mandatory to work properly
however, most probably because another tasklet_wakeup() is done
before/after.

This should be backported up to 2.6.
src/mux_quic.c