From f4bda993dde4f7414a59d48cb3b009a29456d4ba Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Fri, 3 May 2019 22:21:24 +0200 Subject: [PATCH] BUG/MEDIUM: streams: Don't add CF_WRITE_ERROR if early data were rejected. 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 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/stream.c b/src/stream.c index 69a376f79..b3573c8d7 100644 --- a/src/stream.c +++ b/src/stream.c @@ -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; }