mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-09-17 20:24:24 +00:00
httpd: get_http_headers: fix content length check for custom files
Headers are never included here or else get_http_headers would not have been called. As a result, custom files need to set FS_FILE_FLAGS_HEADER_PERSISTENT in file->flags if file->len is the correct length of the file. See also patch #9500 Signed-off-by: goldsimon <goldsimon@gmx.de>
This commit is contained in:
parent
d5d30d49f2
commit
053a5e6e13
@ -937,7 +937,7 @@ get_http_headers(struct http_state *hs, const char *uri)
|
|||||||
} else
|
} else
|
||||||
#endif /* LWIP_HTTPD_SSI */
|
#endif /* LWIP_HTTPD_SSI */
|
||||||
if ((hs->handle == NULL) ||
|
if ((hs->handle == NULL) ||
|
||||||
((hs->handle->flags & (FS_FILE_FLAGS_HEADER_INCLUDED | FS_FILE_FLAGS_HEADER_PERSISTENT)) == FS_FILE_FLAGS_HEADER_INCLUDED)) {
|
((hs->handle->flags & FS_FILE_FLAGS_HEADER_PERSISTENT) == 0)) {
|
||||||
add_content_len = 0;
|
add_content_len = 0;
|
||||||
}
|
}
|
||||||
if (add_content_len) {
|
if (add_content_len) {
|
||||||
|
Loading…
Reference in New Issue
Block a user