mirror of
https://github.com/ep00ch/lwip-contrib-mac.git
synced 2024-07-04 15:29:30 +00:00
Add support to files that don't include HTTP response header
This commit is contained in:
parent
b9113fe615
commit
c43d077828
@ -52,6 +52,9 @@ fs_open(const char *name, struct fs_file *file)
|
|||||||
if (!strcmp(name, (const char*)f->name)) {
|
if (!strcmp(name, (const char*)f->name)) {
|
||||||
file->data = f->data;
|
file->data = f->data;
|
||||||
file->len = f->len;
|
file->len = f->len;
|
||||||
|
#if HTTPD_SUPPORT_DYNAMIC_PAGES
|
||||||
|
file->includes_http_header = f->includes_http_header;
|
||||||
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,9 +32,17 @@
|
|||||||
#ifndef __FS_H__
|
#ifndef __FS_H__
|
||||||
#define __FS_H__
|
#define __FS_H__
|
||||||
|
|
||||||
|
/** Support dynamically created pages (free contents after sending) */
|
||||||
|
#ifndef HTTPD_SUPPORT_DYNAMIC_PAGES
|
||||||
|
#define HTTPD_SUPPORT_DYNAMIC_PAGES 1
|
||||||
|
#endif
|
||||||
|
|
||||||
struct fs_file {
|
struct fs_file {
|
||||||
const unsigned char *data;
|
const unsigned char *data;
|
||||||
int len;
|
int len;
|
||||||
|
#if HTTPD_SUPPORT_DYNAMIC_PAGES
|
||||||
|
u8_t includes_http_header;
|
||||||
|
#endif /* HTTPD_SUPPORT_DYNAMIC_PAGES */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* file must be allocated by caller and will be filled in
|
/* file must be allocated by caller and will be filled in
|
||||||
|
Loading…
Reference in New Issue
Block a user