mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
MINOR: mux-h1/mux-fcgi: Don't needlessly loop on data parsing
Because the function parsing H1 data is now able to handle wrapping input buffers, there is no reason to loop anymore in the muxes to be sure to parse wrapping data.
This commit is contained in:
parent
f7c2044f8f
commit
16a524c9ea
@ -3420,7 +3420,7 @@ static size_t fcgi_strm_parse_response(struct fcgi_strm *fstrm, struct buffer *b
|
|||||||
TRACE_USER("H1 response fully rcvd", FCGI_EV_RSP_DATA|FCGI_EV_RSP_EOM, fconn->conn, fstrm, htx);
|
TRACE_USER("H1 response fully rcvd", FCGI_EV_RSP_DATA|FCGI_EV_RSP_EOM, fconn->conn, fstrm, htx);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ret && h1m->state != H1_MSG_DONE)
|
if (h1m->state < H1_MSG_TRAILERS)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
TRACE_PROTO("rcvd response payload data", FCGI_EV_RSP_DATA|FCGI_EV_RSP_BODY, fconn->conn, fstrm, htx);
|
TRACE_PROTO("rcvd response payload data", FCGI_EV_RSP_DATA|FCGI_EV_RSP_BODY, fconn->conn, fstrm, htx);
|
||||||
@ -3428,7 +3428,7 @@ static size_t fcgi_strm_parse_response(struct fcgi_strm *fstrm, struct buffer *b
|
|||||||
else if (h1m->state == H1_MSG_TRAILERS) {
|
else if (h1m->state == H1_MSG_TRAILERS) {
|
||||||
TRACE_PROTO("parsing response trailers", FCGI_EV_RSP_DATA|FCGI_EV_RSP_TLRS, fconn->conn, fstrm);
|
TRACE_PROTO("parsing response trailers", FCGI_EV_RSP_DATA|FCGI_EV_RSP_TLRS, fconn->conn, fstrm);
|
||||||
ret = fcgi_strm_parse_trailers(fstrm, h1m, htx, &fstrm->rxbuf, &total, count);
|
ret = fcgi_strm_parse_trailers(fstrm, h1m, htx, &fstrm->rxbuf, &total, count);
|
||||||
if (!ret && h1m->state != H1_MSG_DONE)
|
if (h1m->state != H1_MSG_DONE)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
TRACE_PROTO("rcvd H1 response trailers", FCGI_EV_RSP_DATA|FCGI_EV_RSP_TLRS, fconn->conn, fstrm, htx);
|
TRACE_PROTO("rcvd H1 response trailers", FCGI_EV_RSP_DATA|FCGI_EV_RSP_TLRS, fconn->conn, fstrm, htx);
|
||||||
|
@ -1553,7 +1553,7 @@ static size_t h1_process_input(struct h1c *h1c, struct buffer *buf, size_t count
|
|||||||
else if (h1m->state < H1_MSG_TRAILERS) {
|
else if (h1m->state < H1_MSG_TRAILERS) {
|
||||||
TRACE_PROTO("parsing message payload", H1_EV_RX_DATA|H1_EV_RX_BODY, h1c->conn, h1s);
|
TRACE_PROTO("parsing message payload", H1_EV_RX_DATA|H1_EV_RX_BODY, h1c->conn, h1s);
|
||||||
ret = h1_process_data(h1s, h1m, &htx, &h1c->ibuf, &total, count, buf);
|
ret = h1_process_data(h1s, h1m, &htx, &h1c->ibuf, &total, count, buf);
|
||||||
if (!ret && h1m->state != H1_MSG_DONE)
|
if (h1m->state < H1_MSG_TRAILERS)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
TRACE_PROTO((!(h1m->flags & H1_MF_RESP) ? "rcvd H1 request payload data" : "rcvd H1 response payload data"),
|
TRACE_PROTO((!(h1m->flags & H1_MF_RESP) ? "rcvd H1 request payload data" : "rcvd H1 response payload data"),
|
||||||
@ -1562,7 +1562,7 @@ static size_t h1_process_input(struct h1c *h1c, struct buffer *buf, size_t count
|
|||||||
else if (h1m->state == H1_MSG_TRAILERS) {
|
else if (h1m->state == H1_MSG_TRAILERS) {
|
||||||
TRACE_PROTO("parsing message trailers", H1_EV_RX_DATA|H1_EV_RX_TLRS, h1c->conn, h1s);
|
TRACE_PROTO("parsing message trailers", H1_EV_RX_DATA|H1_EV_RX_TLRS, h1c->conn, h1s);
|
||||||
ret = h1_process_trailers(h1s, h1m, htx, &h1c->ibuf, &total, count);
|
ret = h1_process_trailers(h1s, h1m, htx, &h1c->ibuf, &total, count);
|
||||||
if (!ret && h1m->state != H1_MSG_DONE)
|
if (h1m->state != H1_MSG_DONE)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
TRACE_PROTO((!(h1m->flags & H1_MF_RESP) ? "rcvd H1 request trailers" : "rcvd H1 response trailers"),
|
TRACE_PROTO((!(h1m->flags & H1_MF_RESP) ? "rcvd H1 request trailers" : "rcvd H1 response trailers"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user