#define FCGI_SF_WANT_SHUTR 0x00001000 /* a stream couldn't shutr() (mux full/busy) */
#define FCGI_SF_WANT_SHUTW 0x00002000 /* a stream couldn't shutw() (mux full/busy) */
-#define FCGI_SF_KILL_CONN 0x00004000 /* kill the whole connection with this stream */
/* FCGI stream descriptor */
* for example because of a "tcp-request content reject" rule that is
* normally used to limit abuse.
*/
- if ((fstrm->flags & FCGI_SF_KILL_CONN) &&
+ if ((fstrm->endp->flags & CS_EP_KILL_CONN) &&
!(fconn->flags & (FCGI_CF_ABRTS_SENT|FCGI_CF_ABRTS_FAILED))) {
TRACE_STATE("stream wants to kill the connection", FCGI_EV_STRM_SHUT, fconn->conn, fstrm);
fconn->state = FCGI_CS_CLOSED;
* for example because of a "tcp-request content reject" rule that is
* normally used to limit abuse.
*/
- if ((fstrm->flags & FCGI_SF_KILL_CONN) &&
+ if ((fstrm->endp->flags & CS_EP_KILL_CONN) &&
!(fconn->flags & (FCGI_CF_ABRTS_SENT|FCGI_CF_ABRTS_FAILED))) {
TRACE_STATE("stream wants to kill the connection", FCGI_EV_STRM_SHUT, fconn->conn, fstrm);
fconn->state = FCGI_CS_CLOSED;
struct fcgi_strm *fstrm = __cs_mux(cs);
TRACE_POINT(FCGI_EV_STRM_SHUT, fstrm->fconn->conn, fstrm);
- if (cs->endp->flags & CS_EP_KILL_CONN)
- fstrm->flags |= FCGI_SF_KILL_CONN;
-
if (!mode)
return;
-
fcgi_do_shutr(fstrm);
}
struct fcgi_strm *fstrm = __cs_mux(cs);
TRACE_POINT(FCGI_EV_STRM_SHUT, fstrm->fconn->conn, fstrm);
- if (cs->endp->flags & CS_EP_KILL_CONN)
- fstrm->flags |= FCGI_SF_KILL_CONN;
-
fcgi_do_shutw(fstrm);
}
#define H2_SF_WANT_SHUTR 0x00008000 // a stream couldn't shutr() (mux full/busy)
#define H2_SF_WANT_SHUTW 0x00010000 // a stream couldn't shutw() (mux full/busy)
-#define H2_SF_KILL_CONN 0x00020000 // kill the whole connection with this stream
#define H2_SF_EXT_CONNECT_SENT 0x00040000 // rfc 8441 an Extended CONNECT has been sent
#define H2_SF_EXT_CONNECT_RCVD 0x00080000 // rfc 8441 an Extended CONNECT has been received and parsed
* normally used to limit abuse. In this case we schedule a goaway to
* close the connection.
*/
- if ((h2s->flags & H2_SF_KILL_CONN) &&
+ if ((h2s->endp->flags & CS_EP_KILL_CONN) &&
!(h2c->flags & (H2_CF_GOAWAY_SENT|H2_CF_GOAWAY_FAILED))) {
TRACE_STATE("stream wants to kill the connection", H2_EV_STRM_SHUT, h2c->conn, h2s);
h2c_error(h2c, H2_ERR_ENHANCE_YOUR_CALM);
* normally used to limit abuse. In this case we schedule a goaway to
* close the connection.
*/
- if ((h2s->flags & H2_SF_KILL_CONN) &&
+ if ((h2s->endp->flags & CS_EP_KILL_CONN) &&
!(h2c->flags & (H2_CF_GOAWAY_SENT|H2_CF_GOAWAY_FAILED))) {
TRACE_STATE("stream wants to kill the connection", H2_EV_STRM_SHUT, h2c->conn, h2s);
h2c_error(h2c, H2_ERR_ENHANCE_YOUR_CALM);
struct h2s *h2s = __cs_mux(cs);
TRACE_ENTER(H2_EV_STRM_SHUT, h2s->h2c->conn, h2s);
- if (cs->endp->flags & CS_EP_KILL_CONN)
- h2s->flags |= H2_SF_KILL_CONN;
-
if (mode)
h2_do_shutr(h2s);
-
TRACE_LEAVE(H2_EV_STRM_SHUT, h2s->h2c->conn, h2s);
}
struct h2s *h2s = __cs_mux(cs);
TRACE_ENTER(H2_EV_STRM_SHUT, h2s->h2c->conn, h2s);
- if (cs->endp->flags & CS_EP_KILL_CONN)
- h2s->flags |= H2_SF_KILL_CONN;
-
h2_do_shutw(h2s);
TRACE_LEAVE(H2_EV_STRM_SHUT, h2s->h2c->conn, h2s);
}