mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 00:14:02 +00:00
httpd: ssi: support selecting ssi files by file flags, not by extension (at runtime) only
This commit is contained in:
parent
8bd670430a
commit
da01bc4d15
@ -2234,8 +2234,16 @@ http_find_file(struct http_state *hs, const char *uri, int is_09)
|
||||
} else {
|
||||
file = http_get_404_file(hs, &uri);
|
||||
}
|
||||
#if LWIP_HTTPD_SSI && LWIP_HTTPD_SSI_BY_FILE_EXTENSION
|
||||
tag_check = http_uri_is_ssi(file, uri);
|
||||
#if LWIP_HTTPD_SSI
|
||||
if (file != NULL) {
|
||||
if (file->flags & FS_FILE_FLAGS_SSI) {
|
||||
tag_check = 1;
|
||||
} else {
|
||||
#if LWIP_HTTPD_SSI_BY_FILE_EXTENSION
|
||||
tag_check = http_uri_is_ssi(file, uri);
|
||||
#endif /* LWIP_HTTPD_SSI_BY_FILE_EXTENSION */
|
||||
}
|
||||
}
|
||||
#endif /* LWIP_HTTPD_SSI */
|
||||
}
|
||||
if (file == NULL) {
|
||||
|
@ -52,6 +52,8 @@ struct fsdata_chksum {
|
||||
|
||||
#define FS_FILE_FLAGS_HEADER_INCLUDED 0x01
|
||||
#define FS_FILE_FLAGS_HEADER_PERSISTENT 0x02
|
||||
#define FS_FILE_FLAGS_HEADER_KEEPALIVE 0x04
|
||||
#define FS_FILE_FLAGS_SSI 0x08
|
||||
|
||||
/** Define FS_FILE_EXTENSION_T_DEFINED if you have typedef'ed to your private
|
||||
* pointer type (defaults to 'void' so the default usage is 'void*')
|
||||
|
Loading…
Reference in New Issue
Block a user