From 6fee08daab7360ec4cfffee51dc1af9e93612b85 Mon Sep 17 00:00:00 2001 From: Mike Kleshov Date: Fri, 29 Jan 2021 08:02:56 +0300 Subject: [PATCH] httpd: revert part of previous change pextension needs to be zeroed in case fs_file structure is reused in a persistent HTTP connection --- src/apps/http/fs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/apps/http/fs.c b/src/apps/http/fs.c index 3c9f24d5..c5af0769 100644 --- a/src/apps/http/fs.c +++ b/src/apps/http/fs.c @@ -79,6 +79,9 @@ fs_open(struct fs_file *file, const char *name) file->chksum_count = f->chksum_count; file->chksum = f->chksum; #endif /* HTTPD_PRECALCULATED_CHECKSUM */ +#if LWIP_HTTPD_FILE_EXTENSION + file->pextension = NULL; +#endif /* LWIP_HTTPD_FILE_EXTENSION */ #if LWIP_HTTPD_FILE_STATE file->state = fs_state_init(file, name); #endif /* #if LWIP_HTTPD_FILE_STATE */