summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Angelacos <nangel@alpinelinux.org>2011-03-07 04:05:21 +0000
committerNathan Angelacos <nangel@alpinelinux.org>2011-03-07 04:05:21 +0000
commitb83cb9aec7ca9f35916fff436e563145734da098 (patch)
tree3df9620e9c35a6277a44c9fa61d0f22e0f7e5e30
parentb329f365e86e1b35b5e0dfc9abdf9133d4dc8181 (diff)
downloadhaserl-b83cb9aec7ca9f35916fff436e563145734da098.tar.bz2
haserl-b83cb9aec7ca9f35916fff436e563145734da098.tar.xz
fixes to make file upload names work as expected
-rw-r--r--src/h_lua.c4
-rw-r--r--src/rfc2388.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/h_lua.c b/src/h_lua.c
index 6bee6e2..38d318e 100644
--- a/src/h_lua.c
+++ b/src/h_lua.c
@@ -108,7 +108,7 @@ lua_doscript (buffer_t * script, char *name)
void
lua_echo (buffer_t * buf, char *str, size_t len)
{
- static char echo_start[] = " io.write ";
+ static char echo_start[] = " io.write(";
char quote[200] = "]=]"; /* 197 nested comments is a problem */
if (len == 0)
@@ -134,7 +134,7 @@ lua_echo (buffer_t * buf, char *str, size_t len)
quote[0] = ']';
quote[strlen (quote) - 1] = quote[0];
buffer_add (buf, quote, strlen (quote));
- buffer_add (buf, "\n", 1);
+ buffer_add (buf, ")\n", 2);
}
diff --git a/src/rfc2388.c b/src/rfc2388.c
index 0ac4999..0548868 100644
--- a/src/rfc2388.c
+++ b/src/rfc2388.c
@@ -181,6 +181,8 @@ mime_var_putenv (list_t * env, mime_var_t * obj)
buffer_add (&buf, (char *) obj->value.data,
strlen ((char *) obj->value.data) + 1);
myputenv (env, (char *) buf.data, global.haserl_prefix);
+ myputenv (env, (char *) buf.data, global.var_prefix);
+ myputenv (env, (char *) buf.data, global.post_prefix);
buffer_reset (&buf);
/* this saves the name of the file the client supplied */