diff --git a/src/proto_http.c b/src/proto_http.c index 699017619..5fb510f8d 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -3446,7 +3446,8 @@ int http_process_req_common(struct stream *s, struct channel *req, int an_bit, s } } - if (conn && conn->flags & CO_FL_EARLY_DATA) { + if (conn && (conn->flags & CO_FL_EARLY_DATA) && + (conn->flags & (CO_FL_EARLY_SSL_HS | CO_FL_HANDSHAKE))) { struct hdr_ctx ctx; ctx.idx = 0; diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 76f842528..aee3cd965 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -6025,7 +6025,8 @@ smp_fetch_ssl_fc_has_early(const struct arg *args, struct sample *smp, const cha smp->flags = 0; smp->data.type = SMP_T_BOOL; - smp->data.u.sint = (conn->flags & CO_FL_EARLY_DATA) ? 1 : 0; + smp->data.u.sint = ((conn->flags & CO_FL_EARLY_DATA) && + (conn->flags & (CO_FL_EARLY_SSL_HS | CO_FL_HANDSHAKE))) ? 1 : 0; return 1; }