]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: streams: Don't add CF_WRITE_ERROR if early data were rejected.
authorOlivier Houchard <cognet@ci0.org>
Fri, 3 May 2019 20:21:24 +0000 (22:21 +0200)
committerOlivier Houchard <cognet@ci0.org>
Fri, 3 May 2019 20:23:41 +0000 (22:23 +0200)
In sess_update_st_con_tcp(), if we have an error on the stream_interface
because we tried to send early_data but failed, don't flag the request
channel as CF_WRITE_ERROR, or we will never reach the analyser that sends
back the 425 response.

This should be backported to 1.9.

src/stream.c

index 69a376f796cf364fab5ea06549e9412c8a233f61..b3573c8d7c11c85b83fe13a16a84fe9f80562eb7 100644 (file)
@@ -667,7 +667,13 @@ static int sess_update_st_con_tcp(struct stream *s)
                         */
                        si->state    = SI_ST_EST;
                        si->err_type = SI_ET_DATA_ERR;
-                       req->flags |= CF_WRITE_ERROR;
+                       /* Don't add CF_WRITE_ERROR if we're here because
+                        * early data were rejected by the server, or
+                        * http_wait_for_response() will never be called
+                        * to send a 425.
+                        */
+                       if (conn->err_code != CO_ER_SSL_EARLY_FAILED)
+                               req->flags |= CF_WRITE_ERROR;
                        rep->flags |= CF_READ_ERROR;
                        return 1;
                }