[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] Content-Type in httpd_structs.h

From: Fabien Jambois
Subject: Re: [lwip-devel] Content-Type in httpd_structs.h
Date: Wed, 12 Apr 2017 15:52:36 +0200
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

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"



lwip-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]