aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/c/cgi.c
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-12-27 10:37:24 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-12-27 10:37:24 -0500
commit129b1c431efebc77a7a0046c725380ba29b814cf (patch)
tree860e97379bc9422f4f7bd8fade58f9752afd92d9 /src/c/cgi.c
parentc4120c8ddaa5340efad5f835ce4565f2a8ae2cbf (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.c7
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,