]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: connection: and new flag to mark end of input (EOI)
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 22 Mar 2019 13:05:52 +0000 (14:05 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 25 Mar 2019 05:24:25 +0000 (06:24 +0100)
Since the begining, in the H2 multiplexer, when the end of a message is reached,
the flag CS_FL_(R)EOS is set on the conn_stream to notify the upper layer that
all data were received and consumed and there is no longer any expected. The
stream-interface converts it into a shutdown read. But it leads to some
ambiguities with the real shutr. Once it was reported at the end of the message,
there is no way to report it when the read0 is received. For this reason, aborts
after the message was fully received cannot be reported. And on the channel
side, it is hard to make the difference between a shutr because the end of the
message was reached and a shutr because of an abort.

For these reasons, there is now a flag to mark the end of the message. It is
called CS_FL_EOI (end-of-input) because it is only used on the receipt path.
This flag is only declared and not used yet.

This patch will be used by future bug fixes and will have to be backported
to 1.9.

include/types/connection.h

index 33935bbfcc22689fc92d38c4a2e4df25808d4f0b..66a0f46f0b98c1b3dbf28fbe8da19cc87b66c1c8 100644 (file)
@@ -88,6 +88,7 @@ enum {
        CS_FL_EOS           = 0x00001000,  /* End of stream delivered to data layer */
        CS_FL_REOS          = 0x00002000,  /* End of stream received (buffer not empty) */
        CS_FL_READ_NULL     = 0x00004000,  /* Last read received */
+       CS_FL_EOI           = 0x00008000,  /* end-of-input reached */
        CS_FL_WAIT_FOR_HS   = 0x00010000,  /* This stream is waiting for handhskae */
        CS_FL_KILL_CONN     = 0x00020000,  /* must kill the connection when the CS closes */