Since commit
221c40bbf ("MINOR: htx: Add a noop block to carry the EOM
flag on an empty message"), the end of a message may come alone on a
NOOP block when it is received after the last data. comp_http_payload()
only finished the compression on a DATA block carrying the EOM or on a
TLR or EOT block, so in this case the compressed stream was never
finished while the response was sent as complete. This happens with an
H2 server sending END_STREAM in a separate empty DATA frame, or with a
FastCGI application ending its response after its last output. Some
clients accept such a stream, others report an unexpected end of file.
Let's handle a NOOP block carrying the EOM like the TLR and EOT blocks.
This was brought in 3.5-dev14, so no backport is needed.
}
break;
+ case HTX_BLK_NOOP:
+ if (!(blk->flags & HTX_BLK_FL_EOM))
+ goto consume;
+ __fallthrough;
case HTX_BLK_TLR:
case HTX_BLK_EOT:
if (htx_compression_buffer_end(st, out, 1, dir) < 0)