I made a html.c content type handler to set max-age=99999999.
At first, it works.
But when I amended it, saved it,
it didn’t reflect the change until the G-WAN server is restarted.
Is it the designed behavior?
Updated:
add the code as below:
#include "gwan.h" // G-WAN exported functions
#define CACHE "Expires: Fri, May 02 2042 00:00:00 GMT\r\nCache-Control: max-age=99999999\r\n"
int main(int argc, char *argv[])
{
http_header(HEAD_ADD, CACHE, sizeof(CACHE) - 1, argv);
//http_header(HEAD_AFTER, CACHE, sizeof(CACHE) - 1, argv);
return 200;
}
pls advise whether i have done something wrong.
This is the expected behavior.
While
servletsare reloaded on-the-fly, allhandlers(connection handlers, content-type handlers, protocol handlers) are only reloaded once the program is stopped and restarted.We initially thought that handlers are less likely to be modified than servlets. That may be change in a future version.