diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-12-27 10:37:24 -0500 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-12-27 10:37:24 -0500 |
commit | d14fddf5c814d77030a2bf1885ac2e955c8c961e (patch) | |
tree | 860e97379bc9422f4f7bd8fade58f9752afd92d9 /src/c/cgi.c | |
parent | 2ace64baba707b2e76778c74789735263eb50823 (diff) |
All three current protocols work with move to using uw_app
Diffstat (limited to 'src/c/cgi.c')
-rw-r--r-- | src/c/cgi.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/c/cgi.c b/src/c/cgi.c index 38cb7da4..1d7d9810 100644 --- a/src/c/cgi.c +++ b/src/c/cgi.c @@ -5,8 +5,11 @@ #include <unistd.h> #include <stdarg.h> +#include "urweb.h" #include "request.h" +extern uw_app uw_application; + static char *uppercased; static size_t uppercased_len; @@ -51,7 +54,7 @@ static void log_debug(void *data, const char *fmt, ...) { } int main(int argc, char *argv[]) { - uw_context ctx = uw_request_new_context(NULL, log_error, log_debug); + uw_context ctx = uw_request_new_context(&uw_application, NULL, log_error, log_debug); uw_request_context rc = uw_new_request_context(); request_result rr; char *method = getenv("REQUEST_METHOD"), @@ -97,7 +100,7 @@ int main(int argc, char *argv[]) { uw_set_on_success(""); uw_set_headers(ctx, get_header, NULL); - uw_request_init(NULL, log_error, log_debug); + uw_request_init(&uw_application, NULL, log_error, log_debug); body[body_pos] = 0; rr = uw_request(rc, ctx, method, path, query_string, body, body_pos, |