struct qcc_app_ops {
int (*init)(struct qcc *qcc);
int (*attach_ruqs)(struct qcs *qcs, void *ctx);
- int (*decode_qcs)(struct qcs *qcs, void *ctx);
+ int (*decode_qcs)(struct qcs *qcs, int fin, void *ctx);
size_t (*snd_buf)(struct conn_stream *cs, struct buffer *buf, size_t count, int flags);
int (*finalize)(void *ctx);
};
struct buffer *buf;
struct eb64_node offset;
uint64_t len;
+ int fin;
const unsigned char *data;
};
/* Decode <qcs> remotely initiated bidi-stream.
* Returns <0 on error else 0.
*/
-static int h3_decode_qcs(struct qcs *qcs, void *ctx)
+static int h3_decode_qcs(struct qcs *qcs, int fin, void *ctx)
{
struct buffer *rxbuf = &qcs->rx.buf;
struct h3 *h3 = ctx;
b_del(rxbuf, flen);
}
+ if (fin && !b_data(rxbuf))
+ htx->flags |= HTX_FL_EOM;
+
return 0;
fail:
#include <haproxy/mux_quic-t.h>
#include <haproxy/stream.h>
-static int hq_interop_decode_qcs(struct qcs *qcs, void *ctx)
+static int hq_interop_decode_qcs(struct qcs *qcs, int fin, void *ctx)
{
struct buffer *rxbuf = &qcs->rx.buf;
struct htx *htx;
b_del(rxbuf, b_data(rxbuf));
b_free(&htx_buf);
+ if (fin)
+ htx->flags |= HTX_FL_EOM;
+
return 0;
}
else if (!quic_dec_int(&stream->len, buf, end) || end - *buf < stream->len)
return 0;
+ stream->fin = (frm->type & QUIC_STREAM_FRAME_TYPE_FIN_BIT);
+
stream->data = *buf;
*buf += stream->len;
goto store_frm;
ret = qc_strm_cpy(&strm->rx.buf, strm_frm);
- if (ret && qc->qcc->app_ops->decode_qcs(strm, qc->qcc->ctx) < 0) {
+ if (ret && qc->qcc->app_ops->decode_qcs(strm, strm_frm->fin, qc->qcc->ctx) < 0) {
TRACE_PROTO("Decoding error", QUIC_EV_CONN_PSTRM);
return 0;
}