http headers - gwan v7.12.2 mime type handlers not work -


i made handler html.c in folder of handlers

#include "gwan.h" // g-wan exported functions  #include <stdio.h>  int main(int argc, char *argv[ ]) {     char header[ ] =                 //"content-type:text/html; charset=utf-8\r\n"                 "access-control-allow-origin: *\r\n"                 "cache-control:private, max-age=600000000\r\n"                 "expires: thu, 31 dec 2037 23:55:55 gmt\r\n"                 ;     http_header(head_add, header, sizeof(header) - 1, argv);      char *req = (char*)get_env(argv, request); // query: "start=200000"     printf("req: %s\n", req);      return 200; } 

please help. what's wrong of code, since gwan won't generate additional headers accordingly.
edit: did try cache.c example. won't generate "expires" headers too.

there's subtil issue caused system api replacement in recent releases excludes one content-type handler if handlers/main.c_ handler present.

system api rewrites (mostly libc) necessary when behavior has changed , impact g-wan.

a new release on it's way thats fixes , cgi (perl, python).

i'll check cache.c example.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -