mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-18 19:50:54 +00:00
MINOR: mux-h2: add a new dummy stream for the REFUSED_STREAM error code
This patch introduces a new dummy stream, h2_refused_stream, in CLOSED status with the aforementioned error code. It will be usable to reject unexpected extraneous streams.
This commit is contained in:
parent
e6888fff75
commit
8d0d58bf6a
13
src/mux_h2.c
13
src/mux_h2.c
@ -29,8 +29,9 @@
|
|||||||
#include <eb32tree.h>
|
#include <eb32tree.h>
|
||||||
|
|
||||||
|
|
||||||
/* dummy streams returned for idle and closed states */
|
/* dummy streams returned for closed, refused, idle and states */
|
||||||
static const struct h2s *h2_closed_stream;
|
static const struct h2s *h2_closed_stream;
|
||||||
|
static const struct h2s *h2_refused_stream;
|
||||||
static const struct h2s *h2_idle_stream;
|
static const struct h2s *h2_idle_stream;
|
||||||
|
|
||||||
/* Connection flags (32 bit), in h2c->flags */
|
/* Connection flags (32 bit), in h2c->flags */
|
||||||
@ -229,6 +230,16 @@ static const struct h2s *h2_closed_stream = &(const struct h2s){
|
|||||||
.id = 0,
|
.id = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* a dmumy closed stream returning a REFUSED_STREAM error */
|
||||||
|
static const struct h2s *h2_refused_stream = &(const struct h2s){
|
||||||
|
.cs = NULL,
|
||||||
|
.h2c = NULL,
|
||||||
|
.st = H2_SS_CLOSED,
|
||||||
|
.errcode = H2_ERR_REFUSED_STREAM,
|
||||||
|
.flags = 0,
|
||||||
|
.id = 0,
|
||||||
|
};
|
||||||
|
|
||||||
/* and a dummy idle stream for use with any unannounced stream */
|
/* and a dummy idle stream for use with any unannounced stream */
|
||||||
static const struct h2s *h2_idle_stream = &(const struct h2s){
|
static const struct h2s *h2_idle_stream = &(const struct h2s){
|
||||||
.cs = NULL,
|
.cs = NULL,
|
||||||
|
Loading…
Reference in New Issue
Block a user