Experimental Palm Plugin (disabled by default)
[MonkeyD.git] / plugins / palm / cgi.c
blob39bcfbb745bedfaf43c82fc0c3899f523ebc66df
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 /* Monkey HTTP Daemon
4 * ------------------
5 * Copyright (C) 2001-2010, Eduardo Silva P.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Library General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 #include <stdio.h>
23 #include <stdlib.h>
25 #include "palm.h"
26 #include "plugin.h"
27 #include "cgi.h"
29 void mk_cgi_env()
31 mk_api->pointer_set(&mk_cgi_document_root, MK_CGI_DOCUMENT_ROOT);
32 mk_api->pointer_set(&mk_cgi_content_length, MK_CGI_CONTENT_LENGTH);
33 mk_api->pointer_set(&mk_cgi_content_type, MK_CGI_CONTENT_TYPE);
34 mk_api->pointer_set(&mk_cgi_server_addr, MK_CGI_SERVER_ADDR);
35 mk_api->pointer_set(&mk_cgi_server_name, MK_CGI_SERVER_NAME);
36 mk_api->pointer_set(&mk_cgi_server_protocol, MK_CGI_SERVER_PROTOCOL);
37 mk_api->pointer_set(&mk_cgi_server_software, MK_CGI_SERVER_SOFTWARE);
38 mk_api->pointer_set(&mk_cgi_server_signature, MK_CGI_SERVER_SIGNATURE);
39 mk_api->pointer_set(&mk_cgi_http_user_agent, MK_CGI_HTTP_USER_AGENT);
40 mk_api->pointer_set(&mk_cgi_http_accept, MK_CGI_HTTP_ACCEPT);
41 mk_api->pointer_set(&mk_cgi_http_accept_charset,
42 MK_CGI_HTTP_ACCEPT_CHARSET);
43 mk_api->pointer_set(&mk_cgi_http_accept_encoding,
44 MK_CGI_HTTP_ACCEPT_ENCODING);
45 mk_api->pointer_set(&mk_cgi_http_accept_language,
46 MK_CGI_HTTP_ACCEPT_LANGUAGE);
47 mk_api->pointer_set(&mk_cgi_http_host, MK_CGI_HTTP_HOST);
48 mk_api->pointer_set(&mk_cgi_http_cookie, MK_CGI_HTTP_COOKIE);
49 mk_api->pointer_set(&mk_cgi_http_referer, MK_CGI_HTTP_REFERER);
50 mk_api->pointer_set(&mk_cgi_server_port, MK_CGI_SERVER_PORT);
51 mk_api->pointer_set(&mk_cgi_cgi_version, MK_CGI_CGI_VERSION);
52 mk_api->pointer_set(&mk_cgi_gateway_interface, MK_CGI_GATEWAY_INTERFACE);
53 mk_api->pointer_set(&mk_cgi_remote_addr, MK_CGI_REMOTE_ADDR);
54 mk_api->pointer_set(&mk_cgi_request_uri, MK_CGI_REQUEST_URI);
55 mk_api->pointer_set(&mk_cgi_request_method, MK_CGI_REQUEST_METHOD);
56 mk_api->pointer_set(&mk_cgi_script_name, MK_CGI_SCRIPT_NAME);
57 mk_api->pointer_set(&mk_cgi_script_filename, MK_CGI_SCRIPT_FILENAME);
58 mk_api->pointer_set(&mk_cgi_remote_port, MK_CGI_REMOTE_PORT);
59 mk_api->pointer_set(&mk_cgi_query_string, MK_CGI_QUERY_STRING);
60 mk_api->pointer_set(&mk_cgi_post_vars, MK_CGI_POST_VARS);
61 mk_api->pointer_set(&mk_cgi_version, MK_CGI_VERSION);