mirror of https://github.com/openssl/openssl.git
Preserve fileprefix accross reuse in http3 demo server
The fileprefix that we serve content from needs to be preserved accross h3ssl reuse. Make sure we restore it after zeroing the struct. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/26180)
This commit is contained in:
parent
9570ecfc69
commit
66e1e60a61
|
|
@ -84,6 +84,7 @@ static void init_ids(struct h3ssl *h3ssl)
|
||||||
{
|
{
|
||||||
struct ssl_id *ssl_ids;
|
struct ssl_id *ssl_ids;
|
||||||
int i;
|
int i;
|
||||||
|
char *prior_fileprefix = h3ssl->fileprefix;
|
||||||
|
|
||||||
memset (h3ssl, 0, sizeof (struct h3ssl));
|
memset (h3ssl, 0, sizeof (struct h3ssl));
|
||||||
|
|
||||||
|
|
@ -92,6 +93,9 @@ static void init_ids(struct h3ssl *h3ssl)
|
||||||
ssl_ids[i].id = UINT64_MAX;
|
ssl_ids[i].id = UINT64_MAX;
|
||||||
}
|
}
|
||||||
h3ssl->id_bidi = UINT64_MAX;
|
h3ssl->id_bidi = UINT64_MAX;
|
||||||
|
|
||||||
|
/* restore the fileprefix */
|
||||||
|
h3ssl->fileprefix = prior_fileprefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void reuse_h3ssl(struct h3ssl *h3ssl)
|
static void reuse_h3ssl(struct h3ssl *h3ssl)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue