diff src/c/driver.c @ 458:8f65b0fa3b29

Avoid allocating strings for requestHeader
author Adam Chlipala <adamc@hcoop.net>
date Thu, 06 Nov 2008 10:04:03 -0500
parents 360cbc202756
children 21bb5bbba2e9
line wrap: on
line diff
--- a/src/c/driver.c	Thu Nov 06 09:47:16 2008 -0500
+++ b/src/c/driver.c	Thu Nov 06 10:04:03 2008 -0500
@@ -188,6 +188,8 @@
 
         printf("Serving URI %s....\n", path);
 
+        uw_set_headers(ctx, headers);
+
         while (1) {
           if (uw_db_begin(ctx)) {
             printf("Error running SQL BEGIN\n");
@@ -209,7 +211,7 @@
           uw_write(ctx, "<html>");
 
           strcpy(path_copy, path);
-          fk = uw_begin(ctx, headers, path_copy);
+          fk = uw_begin(ctx, path_copy);
           if (fk == SUCCESS) {
             uw_write(ctx, "</html>");