diff src/c/driver.c @ 457:360cbc202756

Request header reading works
author Adam Chlipala <adamc@hcoop.net>
date Thu, 06 Nov 2008 09:47:16 -0500
parents b10132434adc
children 8f65b0fa3b29
line wrap: on
line diff
--- a/src/c/driver.c	Thu Nov 06 09:21:34 2008 -0500
+++ b/src/c/driver.c	Thu Nov 06 09:47:16 2008 -0500
@@ -135,7 +135,7 @@
     
       if (s = strstr(buf, "\r\n\r\n")) {
         failure_kind fk;
-        char *cmd, *path, path_copy[uw_bufsize+1], *inputs;
+        char *cmd, *path, *headers, path_copy[uw_bufsize+1], *inputs;
 
         *s = 0;
 
@@ -145,6 +145,7 @@
         }
 
         *s = 0;
+        headers = s + 2;
         cmd = s = buf;
 
         printf("Read: %s\n", buf);
@@ -208,7 +209,7 @@
           uw_write(ctx, "<html>");
 
           strcpy(path_copy, path);
-          fk = uw_begin(ctx, path_copy);
+          fk = uw_begin(ctx, headers, path_copy);
           if (fk == SUCCESS) {
             uw_write(ctx, "</html>");