// ============================================================================ // C servlet sample for the G-WAN Web Application Server (http://trustleap.ch/) // ---------------------------------------------------------------------------- // power.c: to show how to use // ============================================================================ // imported functions: // get_reply(): get a pointer on the 'reply' dynamic buffer from the server // xbuf_cat(): like strcat(), but it works in the specified dynamic buffer // ---------------------------------------------------------------------------- #include "gwan.h" // G-WAN exported functions int main(int argc, char *argv[]) { char header[] = "Powered-by: ANSI C scripts\r\n"; http_header(HEAD_ADD, header, sizeof(header) - 1, argv); xbuf_cat(get_reply(argv), "Look at the HTTP headers"); return HTTP_200_OK; // return an HTTP code } // ============================================================================ // End of Source Code // ============================================================================