]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: mux-fcgi: Don't needlessly store result of data/trailers parsing
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 2 Jun 2021 10:04:40 +0000 (12:04 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 2 Jun 2021 10:04:42 +0000 (12:04 +0200)
Return values of fcgi_strm_parse_data() and fcgi_strm_parse_trailers() are
no longer checked. Thus it is useless to store it.

This patch should fix the issues #1269 and #1268.

src/mux_fcgi.c

index 6fd76535f9c100119b9c7dccc53e3177ffa4e673..7be9755319131561dfc2d495ba776d469cdc8221 100644 (file)
@@ -3410,7 +3410,7 @@ static size_t fcgi_strm_parse_response(struct fcgi_strm *fstrm, struct buffer *b
                }
                else if (h1m->state < H1_MSG_TRAILERS) {
                        TRACE_PROTO("parsing response payload", FCGI_EV_RSP_DATA|FCGI_EV_RSP_BODY, fconn->conn, fstrm);
-                       ret = fcgi_strm_parse_data(fstrm, h1m, &htx, &fstrm->rxbuf, &total, count, buf);
+                       fcgi_strm_parse_data(fstrm, h1m, &htx, &fstrm->rxbuf, &total, count, buf);
 
                        if (!(h1m->flags & H1_MF_XFER_LEN) && fstrm->state != FCGI_SS_ERROR &&
                            (fstrm->flags & FCGI_SF_ES_RCVD) && b_data(&fstrm->rxbuf) == total) {
@@ -3427,7 +3427,7 @@ static size_t fcgi_strm_parse_response(struct fcgi_strm *fstrm, struct buffer *b
                }
                else if (h1m->state == H1_MSG_TRAILERS) {
                        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);
+                       fcgi_strm_parse_trailers(fstrm, h1m, htx, &fstrm->rxbuf, &total, count);
                        if (h1m->state != H1_MSG_DONE)
                                break;