summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-10-21 13:54:48 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-10-21 13:54:48 -0400
commit8656393c5cbc5171e5baa30bc79fe13ffa0f406d (patch)
tree0def64e149d89811b6bcb98012313482e60f4c1c /src
parent69559dc94815a000729c7ccef8216dec5b5158cc (diff)
Fix a nasty driver bug, involving memory restarts and marked-up request strings
Diffstat (limited to 'src')
-rw-r--r--src/c/driver.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/c/driver.c b/src/c/driver.c
index 705bb613..94436298 100644
--- a/src/c/driver.c
+++ b/src/c/driver.c
@@ -116,7 +116,7 @@ static void *worker(void *data) {
*back = 0;
if (s = strstr(buf, "\r\n\r\n")) {
- char *cmd, *path, *inputs;
+ char *cmd, *path, path_copy[uw_bufsize+1], *inputs;
*s = 0;
@@ -175,7 +175,8 @@ static void *worker(void *data) {
uw_write(ctx, "Content-type: text/html\r\n\r\n");
uw_write(ctx, "<html>");
- fk = uw_begin(ctx, path);
+ strcpy(path_copy, path);
+ fk = uw_begin(ctx, path_copy);
if (fk == SUCCESS) {
uw_write(ctx, "</html>");
break;