mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
CLEANUP: mux-h1: Remove condition rejecting upgrade requests with payload
Now, "Upgrade:" header is removed from such requests. Thus, the condition to reject them is now useless and can be removed. Code to handle unimplemented features is now unused but is preserved for future uses. This patch may be backported to 2.4.
This commit is contained in:
parent
f079f44096
commit
0fa8007102
@ -1535,14 +1535,6 @@ static size_t h1_process_demux(struct h1c *h1c, struct buffer *buf, size_t count
|
|||||||
TRACE_USER((!(h1m->flags & H1_MF_RESP) ? "rcvd H1 request headers" : "rcvd H1 response headers"),
|
TRACE_USER((!(h1m->flags & H1_MF_RESP) ? "rcvd H1 request headers" : "rcvd H1 response headers"),
|
||||||
H1_EV_RX_DATA|H1_EV_RX_HDRS, h1c->conn, h1s, htx, (size_t[]){ret});
|
H1_EV_RX_DATA|H1_EV_RX_HDRS, h1c->conn, h1s, htx, (size_t[]){ret});
|
||||||
|
|
||||||
/* Reject Protocol upgrade request with payload */
|
|
||||||
if ((h1m->flags & (H1_MF_RESP|H1_MF_CONN_UPG)) == H1_MF_CONN_UPG && h1m->state != H1_MSG_DONE) {
|
|
||||||
h1s->flags |= H1S_F_NOT_IMPL_ERROR;
|
|
||||||
TRACE_ERROR("Upgrade with body not implemented, reject H1 message",
|
|
||||||
H1_EV_RX_DATA|H1_EV_RX_HDRS|H1_EV_H1S_ERR, h1s->h1c->conn, h1s);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((h1m->flags & H1_MF_RESP) &&
|
if ((h1m->flags & H1_MF_RESP) &&
|
||||||
h1s->status < 200 && (h1s->status == 100 || h1s->status >= 102)) {
|
h1s->status < 200 && (h1s->status == 100 || h1s->status >= 102)) {
|
||||||
h1m_init_res(&h1s->res);
|
h1m_init_res(&h1s->res);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user