mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-13 23:14:46 +00:00
0b46548a68
1xx responses does not work in HTTP2 when the HTX is enabled. First of all, when a response is parsed, only one HEADERS frame is expected. So when an interim response is received, the flag H2_SF_HEADERS_RCVD is set and the next HEADERS frame (for another interim repsonse or the final one) is parsed as a trailers one. Then when the response is sent, because an EOM block is found at the end of the interim HTX response, the ES flag is added on the frame, closing too early the stream. Here, it is a design problem of the HTX. Iterim responses are considered as full messages, leading to some ambiguities when HTX messages are processed. This will not be fixed now, but we need to keep it in mind for future improvements. To fix the parsing bug, the flag H2_MSGF_RSP_1XX is added when the response headers are decoded. When this flag is set, an EOM block is added into the HTX message, despite the fact that there is no ES flag on the frame. And we don't set the flag H2_SF_HEADERS_RCVD on the corresponding H2S. So the next HEADERS frame will not be parsed as a trailers one. To fix the sending bug, the ES flag is not set on the frame when an interim response is processed and the flag H2_SF_HEADERS_SENT is not set on the corresponding H2S. This patch must be backported to 1.9. |
||
---|---|---|
.. | ||
common | ||
import | ||
proto | ||
types |