Hi Simon
On 12.04.2017 15:20, Simon Goldschmidt wrote:
Fabien Jambois wrote:
Now, I'd like to support File caching with "Last-Modified: ..." and "Cache-Control: max-age=sec", in HTTP header of the response.
[..]
How can we do that without modifying the core of httpd code?
Is there any API for that purpose, I missed?
You can't do that with the current httpd code. There is no API to insert custom header fields. But that could of course be done.
The question is if we can define a good API or rather leave it open to insert any header you want...
I thought to define a new callback function, passing the information
of the file (struct
fs_file and file name) where we can add the http headers we
want.
In that case we have to add a new field to add the modified date and
time in the struct fs_file, either with a u32_t timestamp or
a pointer to a const
char* pointing to something like "Tue, "11 Apr 2017 17:35:57 GMT"
/Fabien.
Simon
_______________________________________________
lwip-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-devel
|