summaryrefslogtreecommitdiff
path: root/src/c/cgi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/c/cgi.c')
-rw-r--r--src/c/cgi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/c/cgi.c b/src/c/cgi.c
index 6d6e5252..d3ec32c7 100644
--- a/src/c/cgi.c
+++ b/src/c/cgi.c
@@ -1,6 +1,7 @@
#include "config.h"
#include <stdio.h>
+#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
@@ -39,6 +40,10 @@ static char *get_header(void *data, const char *h) {
return NULL;
}
+static char *get_env(void *data, const char *name) {
+ return getenv(name);
+}
+
static void on_success(uw_context ctx) { }
static void on_failure(uw_context ctx) {
@@ -102,6 +107,7 @@ int main(int argc, char *argv[]) {
uw_set_on_success("");
uw_set_headers(ctx, get_header, NULL);
+ uw_set_env(ctx, get_env, NULL);
uw_request_init(&uw_application, NULL, log_error, log_debug);
body[body_pos] = 0;