mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-01 11:01:46 +00:00
MINOR: early data: Never remove the CO_FL_EARLY_DATA flag.
It may be useful to keep the CO_FL_EARLY_DATA flag, so that we know early data were used, so instead of doing this, only add the Early-data header, and have the sample fetch ssl_fc_has_early return 1, if CO_FL_EARLY_DATA is set, and if the handshake isn't done yet.
This commit is contained in:
parent
6fa63d9852
commit
25ae45a078
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user