summaryrefslogtreecommitdiff
path: root/src/c/http.c
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2012-08-02 16:33:25 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2012-08-02 16:33:25 -0400
commitfdc6c1310be60fbeb597400618473861f78676de (patch)
tree201d14d77f7f944545809bff02ae45fc826bb7e7 /src/c/http.c
parent722b0c632007ac6ea178b05695974e447b4288a3 (diff)
Basis.getenv
Diffstat (limited to 'src/c/http.c')
-rw-r--r--src/c/http.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/c/http.c b/src/c/http.c
index 9af86070..aa045d7a 100644
--- a/src/c/http.c
+++ b/src/c/http.c
@@ -40,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) {
uw_write_header(ctx, "HTTP/1.1 200 OK\r\n");
}
@@ -193,6 +197,7 @@ static void *worker(void *data) {
}
uw_set_headers(ctx, get_header, headers);
+ uw_set_env(ctx, get_env, NULL);
printf("Serving URI %s....\n", path);
rr = uw_request(rc, ctx, method, path, query_string, body, back - body,