Since commit
723c73f8a ("MEDIUM: mux-h1: Split h1_process_mux() to make
code more readable"), outgoing H1 requests with no header at all (i.e.
essentially HTTP/1.0 requests) get delayed by 200ms. Christopher found
that it's due to the fact that we end processing too early and we don't
have the opportunity to send the EOH in this case.
This fix addresses it by verifying if it's required to emit EOH when
retruning from h1_make_headers(). But maybe that block could be moved
after the while loop in fact, or the stop condition in the loop be
revisited not to stop of !htx_is_empty(). The current solution gets the
job done at least.
No backport is needed, this was in 2.9-dev.
case H1_MSG_HDR_NAME:
ret = h1_make_headers(h1s, h1m, htx, count);
+ if (unlikely(h1m->state == H1_MSG_LAST_LF)) // in case of no header
+ ret += h1_make_eoh(h1s, h1m, htx, count);
break;
case H1_MSG_LAST_LF: