summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNathan Angelacos <nangel@alpinelinux.org>2011-03-06 05:14:25 +0000
committerNathan Angelacos <nangel@alpinelinux.org>2011-03-06 05:14:25 +0000
commitb329f365e86e1b35b5e0dfc9abdf9133d4dc8181 (patch)
treee6bbb411679f224c47c5cd09046daa12f594afe6 /src
parent2051d1173da76d6470663c9ab715638d1c7844e2 (diff)
downloadhaserl-b329f365e86e1b35b5e0dfc9abdf9133d4dc8181.tar.bz2
haserl-b329f365e86e1b35b5e0dfc9abdf9133d4dc8181.tar.xz
0.9.28 pre-release commit
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am29
-rw-r--r--src/h_bash.c2
-rw-r--r--src/haserl.c24
-rw-r--r--src/haserl.h1
-rw-r--r--src/haserl_lualib.inc171
-rw-r--r--src/haserl_lualib.lua5
-rw-r--r--src/rfc2388.c2
7 files changed, 119 insertions, 115 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index cf11ae7..96c1f22 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -19,24 +19,17 @@ BASHSOURCE = h_bash.c h_bash.h
endif
if USE_LUA
-
-haserl_lualib.inc : haserl_lualib.lua
- @echo '-----------------------------------------------------'
- @echo 'Whoops. haserl_lualib.inc is old. You will need'
- @echo 'to compile lua2c by hand, or help the maintainer'
- @echo 'get automake to do it for you.'
- @echo ''
- @echo 'For now, to compile lua2c:'
- @echo ''
- @echo 'gcc -I<luaheaderdir> -Wl,-E -L<lualibdir> -o lua2c lua2c.c -llua -ldl -lm'
- @echo ''
- @echo ''
- @echo 'Then follow the instructions in lua2c.c to create a'
- @echo 'new haserl_lualib.inc'
- @echo ''
- @echo 'Sorry.'
- @echo '-----------------------------------------------------'
- @exit 1
+# lua2c_LIBS ?= -llua -ldl -lm
+lua2c_LDFLAGS ?= -Wl,-E
+lua2c: lua2c.c
+ $(CC_FOR_BUILD) $(CFLAGS) $(LDFLAGS) $(lua2c_LDFLAGS) \
+ -o $@ $^ $(LIBS)
+
+haserl_lualib.inc : haserl_lualib.lua lua2c
+ if ! ./lua2c haserl_lualib haserl_lualib.lua >$@; then \
+ rm $@; \
+ exit 1 ;\
+ fi
h_lua_common.c : haserl_lualib.inc
diff --git a/src/h_bash.c b/src/h_bash.c
index dcb371c..8c9c64c 100644
--- a/src/h_bash.c
+++ b/src/h_bash.c
@@ -137,7 +137,7 @@ bash_echo (buffer_t * buf, char *str, size_t len)
* we will take the (ancient) POSIX1 standard of 4K, subtract 1K from it and use that
* as the maxmimum. The Linux limit appears to be 128K, so 3K will fit. */
- static char echo_start[] = "echo -n '";
+ static char echo_start[] = "printf '%s' '";
static char echo_quote[] = "'\\''";
static char echo_end[] = "'\n";
const size_t maxlen = 3096;
diff --git a/src/haserl.c b/src/haserl.c
index f1965af..9d8a30f 100644
--- a/src/haserl.c
+++ b/src/haserl.c
@@ -1,6 +1,6 @@
/* --------------------------------------------------------------------------
* core of haserl.cgi - a poor-man's php for embedded/lightweight environments
- * Copyright (c) 2003-2007 Nathan Angelacos (nangel@users.sourceforge.net)
+ * Copyright (c) 2003-2011 Nathan Angelacos (nangel@users.sourceforge.net)
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 2, as published by the Free
@@ -397,17 +397,17 @@ haserlflags (list_t * env)
{
char buf[200];
- snprintf (buf, 200, "HASERL_UPLOAD_DIR=%s", global.uploaddir);
- myputenv (env, buf, global.nul_prefix);
+ snprintf (buf, 200, "UPLOAD_DIR=%s", global.uploaddir);
+ myputenv (env, buf, global.haserl_prefix);
- snprintf (buf, 200, "HASERL_UPLOAD_LIMIT=%lu", global.uploadkb);
- myputenv (env, buf, global.nul_prefix);
+ snprintf (buf, 200, "UPLOAD_LIMIT=%lu", global.uploadkb);
+ myputenv (env, buf, global.haserl_prefix);
- snprintf (buf, 200, "HASERL_ACCEPT_ALL=%d", global.acceptall);
- myputenv (env, buf, global.nul_prefix);
+ snprintf (buf, 200, "ACCEPT_ALL=%d", global.acceptall);
+ myputenv (env, buf, global.haserl_prefix);
- snprintf (buf, 200, "HASERL_SHELL=%s", global.shell);
- myputenv (env, buf, global.nul_prefix);
+ snprintf (buf, 200, "SHELL=%s", global.shell);
+ myputenv (env, buf, global.haserl_prefix);
}
@@ -644,6 +644,7 @@ assignGlobalStartupValues ()
global.get_prefix = "GET_";
global.post_prefix = "POST_";
global.cookie_prefix = "COOKIE_";
+ global.haserl_prefix = "HASERL_";
global.nul_prefix = "";
}
@@ -819,7 +820,10 @@ main (int argc, char *argv[])
shell_destroy = &lua_common_destroy;
global.var_prefix = "FORM.";
global.nul_prefix = "ENV.";
-
+ global.get_prefix = "GET.";
+ global.post_prefix = "POST.";
+ global.cookie_prefix = "COOKIE.";
+ global.haserl_prefix = "HASERL.";
if (global.shell[3] == 'c') /* luac only */
#ifdef INCLUDE_LUACSHELL
shell_doscript = &luac_doscript;
diff --git a/src/haserl.h b/src/haserl.h
index e7b0e1f..4fcfe8c 100644
--- a/src/haserl.h
+++ b/src/haserl.h
@@ -14,6 +14,7 @@ typedef struct
char *post_prefix; /* what name we give to POST variables */
char *cookie_prefix; /* what name we give to COOKIE variables */
char *nul_prefix; /* what name we give to environment variables*/
+ char *haserl_prefix; /* what name we give to HASERL variables */
token_t *uploadlist; /* a linked list of pathspecs */
int debug; /* true if in "debug" mode */
int acceptall; /* true if we'll accept POST data on
diff --git a/src/haserl_lualib.inc b/src/haserl_lualib.inc
index e533384..66cfddc 100644
--- a/src/haserl_lualib.inc
+++ b/src/haserl_lualib.inc
@@ -3,88 +3,95 @@
static const unsigned char haserl_lualib[] = {
27, 76,117, 97, 81, 0, 1, 4, 4, 4, 8, 0, 19, 0, 0, 0,
64,104, 97,115,101,114,108, 95,108,117, 97,108,105, 98, 46,108,
- 117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 16,
- 0, 0, 0, 10, 0, 0, 0, 74, 0, 0, 0,138, 0, 0, 0,135,
+ 117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 7, 24,
+ 0, 0, 0, 10, 0, 0, 0, 74, 0, 0, 0,138, 0, 0, 0,202,
+ 0, 0, 0, 10, 1, 0, 0, 74, 1, 0, 0,138, 1, 0, 0,135,
+ 129, 1, 0, 71, 65, 1, 0, 7, 1, 1, 0,199,192, 0, 0,135,
128, 0, 0, 71, 64, 0, 0, 7, 0, 0, 0, 5, 0, 0, 0,100,
- 0, 0, 0, 9, 64,128,129, 5, 0, 0, 0,100, 64, 0, 0, 9,
- 64, 0,130, 5, 0, 0, 0,100,128, 0, 0, 9, 64,128,130, 30,
- 0,128, 0, 6, 0, 0, 0, 4, 7, 0, 0, 0,104, 97,115,101,
+ 0, 0, 0, 9, 64,128,131, 5, 0, 0, 0,100, 64, 0, 0, 9,
+ 64, 0,132, 5, 0, 0, 0,100,128, 0, 0, 9, 64,128,132, 30,
+ 0,128, 0, 10, 0, 0, 0, 4, 7, 0, 0, 0,104, 97,115,101,
114,108, 0, 4, 5, 0, 0, 0, 70, 79, 82, 77, 0, 4, 4, 0,
- 0, 0, 69, 78, 86, 0, 4, 9, 0, 0, 0,115,101,116,102,105,
- 101,108,100, 0, 4, 9, 0, 0, 0,103,101,116,102,105,101,108,
- 100, 0, 4, 9, 0, 0, 0,109,121,112,117,116,101,110,118, 0,
- 3, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 37, 0, 0, 0,
- 0, 2, 0, 10, 29, 0, 0, 0,133, 0, 0, 0,197, 64, 0, 0,
- 198,128,192, 1, 0, 1, 0, 0, 65,193, 0, 0,220, 0,129, 1,
- 22,128, 4,128, 5, 2, 1, 0, 64, 2, 0, 3, 28,130, 0, 1,
- 26, 2, 0, 0, 22,192, 0,128, 5, 2, 1, 0, 64, 2, 0, 3,
- 28,130, 0, 1,128, 1, 0, 4, 23, 64,193, 3, 22,128, 1,128,
- 6,130, 1, 1, 26, 66, 0, 0, 22, 0, 0,128, 10, 2, 0, 0,
- 137, 0, 2, 3,134,128, 1, 1, 22, 0, 0,128,137, 64, 0, 3,
- 225,128, 0, 0, 22,128,250,127, 30, 0,128, 0, 6, 0, 0, 0,
- 4, 3, 0, 0, 0, 95, 71, 0, 4, 7, 0, 0, 0,115,116,114,
- 105,110,103, 0, 4, 6, 0, 0, 0,103,102,105,110,100, 0, 4,
- 15, 0, 0, 0, 40, 91, 37,119, 95, 37, 45, 93, 43, 41, 40, 46,
- 63, 41, 0, 4, 9, 0, 0, 0,116,111,110,117,109, 98,101,114,
- 0, 4, 2, 0, 0, 0, 46, 0, 0, 0, 0, 0, 29, 0, 0, 0,
- 25, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0,
- 26, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 27, 0, 0, 0,
- 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0,
- 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0,
- 30, 0, 0, 0, 30, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0,
- 31, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 32, 0, 0, 0,
- 32, 0, 0, 0, 34, 0, 0, 0, 26, 0, 0, 0, 35, 0, 0, 0,
- 37, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0,102, 0, 0, 0,
- 0, 0, 28, 0, 0, 0, 2, 0, 0, 0,118, 0, 0, 0, 0, 0,
- 28, 0, 0, 0, 2, 0, 0, 0,116, 0, 1, 0, 0, 0, 28, 0,
- 0, 0, 16, 0, 0, 0, 40,102,111,114, 32,103,101,110,101,114,
- 97,116,111,114, 41, 0, 6, 0, 0, 0, 28, 0, 0, 0, 12, 0,
- 0, 0, 40,102,111,114, 32,115,116, 97,116,101, 41, 0, 6, 0,
- 0, 0, 28, 0, 0, 0, 14, 0, 0, 0, 40,102,111,114, 32, 99,
- 111,110,116,114,111,108, 41, 0, 6, 0, 0, 0, 28, 0, 0, 0,
- 2, 0, 0, 0,119, 0, 7, 0, 0, 0, 26, 0, 0, 0, 2, 0,
- 0, 0,100, 0, 7, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 39, 0, 0, 0, 45, 0, 0, 0, 0, 1, 0, 8,
- 12, 0, 0, 0, 69, 0, 0, 0,133, 64, 0, 0,134,128, 64, 1,
- 192, 0, 0, 0, 1,193, 0, 0,156, 0,129, 1, 22, 0, 0,128,
- 70, 64,129, 0,161, 64, 0, 0, 22, 0,255,127, 94, 0, 0, 1,
- 30, 0,128, 0, 4, 0, 0, 0, 4, 3, 0, 0, 0, 95, 71, 0,
- 4, 7, 0, 0, 0,115,116,114,105,110,103, 0, 4, 6, 0, 0,
- 0,103,102,105,110,100, 0, 4, 7, 0, 0, 0, 91, 37,119, 95,
- 93, 43, 0, 0, 0, 0, 0, 12, 0, 0, 0, 40, 0, 0, 0, 41,
- 0, 0, 0, 41, 0, 0, 0, 41, 0, 0, 0, 41, 0, 0, 0, 41,
- 0, 0, 0, 41, 0, 0, 0, 42, 0, 0, 0, 41, 0, 0, 0, 42,
- 0, 0, 0, 44, 0, 0, 0, 45, 0, 0, 0, 6, 0, 0, 0, 2,
- 0, 0, 0,102, 0, 0, 0, 0, 0, 11, 0, 0, 0, 2, 0, 0,
- 0,118, 0, 1, 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 40,
- 102,111,114, 32,103,101,110,101,114, 97,116,111,114, 41, 0, 6,
- 0, 0, 0, 10, 0, 0, 0, 12, 0, 0, 0, 40,102,111,114, 32,
- 115,116, 97,116,101, 41, 0, 6, 0, 0, 0, 10, 0, 0, 0, 14,
- 0, 0, 0, 40,102,111,114, 32, 99,111,110,116,114,111,108, 41,
- 0, 6, 0, 0, 0, 10, 0, 0, 0, 2, 0, 0, 0,119, 0, 7,
- 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
- 0, 0, 0, 53, 0, 0, 0, 0, 2, 0, 6, 20, 0, 0, 0,133,
- 0, 0, 0,134, 64, 64, 1,192, 0, 0, 0, 1,129, 0, 0, 65,
- 193, 0, 0,156,128, 0, 2, 0, 0, 0, 1,133, 0, 0, 0,134,
- 64, 64, 1,192, 0, 0, 0, 1, 1, 1, 0, 65,193, 0, 0,156,
- 128, 0, 2, 0, 0, 0, 1,133, 64, 1, 0,134,128, 65, 1,192,
- 0, 0, 0, 0, 1,128, 0,156, 64,128, 1, 30, 0,128, 0, 7,
- 0, 0, 0, 4, 7, 0, 0, 0,115,116,114,105,110,103, 0, 4,
- 5, 0, 0, 0,103,115,117, 98, 0, 4, 7, 0, 0, 0, 91, 92,
- 93, 92, 91, 93, 0, 4, 2, 0, 0, 0, 46, 0, 4, 6, 0, 0,
- 0, 91, 92, 46, 93, 43, 0, 4, 7, 0, 0, 0,104, 97,115,101,
- 114,108, 0, 4, 9, 0, 0, 0,115,101,116,102,105,101,108,100,
- 0, 0, 0, 0, 0, 20, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0,
- 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0,
- 0, 49, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0,
- 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0,
- 0, 52, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0,
- 0, 52, 0, 0, 0, 53, 0, 0, 0, 2, 0, 0, 0, 4, 0, 0,
- 0,107,101,121, 0, 0, 0, 0, 0, 19, 0, 0, 0, 6, 0, 0,
- 0,118, 97,108,117,101, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0,
- 0, 0, 0, 16, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21,
- 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 21, 0, 0, 0, 23,
- 0, 0, 0, 37, 0, 0, 0, 23, 0, 0, 0, 39, 0, 0, 0, 45,
- 0, 0, 0, 39, 0, 0, 0, 47, 0, 0, 0, 53, 0, 0, 0, 47,
- 0, 0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 69, 78, 86, 0, 4, 7, 0, 0, 0, 67, 79, 79, 75, 73,
+ 69, 0, 4, 7, 0, 0, 0, 72, 65, 83, 69, 82, 76, 0, 4, 4,
+ 0, 0, 0, 71, 69, 84, 0, 4, 5, 0, 0, 0, 80, 79, 83, 84,
+ 0, 4, 9, 0, 0, 0,115,101,116,102,105,101,108,100, 0, 4,
+ 9, 0, 0, 0,103,101,116,102,105,101,108,100, 0, 4, 9, 0,
+ 0, 0,109,121,112,117,116,101,110,118, 0, 3, 0, 0, 0, 0,
+ 0, 0, 0, 22, 0, 0, 0, 36, 0, 0, 0, 0, 2, 0, 10, 29,
+ 0, 0, 0,133, 0, 0, 0,197, 64, 0, 0,198,128,192, 1, 0,
+ 1, 0, 0, 65,193, 0, 0,220, 0,129, 1, 22,128, 4,128, 5,
+ 2, 1, 0, 64, 2, 0, 3, 28,130, 0, 1, 26, 2, 0, 0, 22,
+ 192, 0,128, 5, 2, 1, 0, 64, 2, 0, 3, 28,130, 0, 1,128,
+ 1, 0, 4, 23, 64,193, 3, 22,128, 1,128, 6,130, 1, 1, 26,
+ 66, 0, 0, 22, 0, 0,128, 10, 2, 0, 0,137, 0, 2, 3,134,
+ 128, 1, 1, 22, 0, 0,128,137, 64, 0, 3,225,128, 0, 0, 22,
+ 128,250,127, 30, 0,128, 0, 6, 0, 0, 0, 4, 3, 0, 0, 0,
+ 95, 71, 0, 4, 7, 0, 0, 0,115,116,114,105,110,103, 0, 4,
+ 6, 0, 0, 0,103,102,105,110,100, 0, 4, 15, 0, 0, 0, 40,
+ 91, 37,119, 95, 37, 45, 93, 43, 41, 40, 46, 63, 41, 0, 4, 9,
+ 0, 0, 0,116,111,110,117,109, 98,101,114, 0, 4, 2, 0, 0,
+ 0, 46, 0, 0, 0, 0, 0, 29, 0, 0, 0, 24, 0, 0, 0, 25,
+ 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25, 0, 0, 0, 25,
+ 0, 0, 0, 25, 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 26,
+ 0, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 27, 0, 0, 0, 27,
+ 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 29, 0, 0, 0, 29,
+ 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30,
+ 0, 0, 0, 30, 0, 0, 0, 31, 0, 0, 0, 31, 0, 0, 0, 33,
+ 0, 0, 0, 25, 0, 0, 0, 34, 0, 0, 0, 36, 0, 0, 0, 8,
+ 0, 0, 0, 2, 0, 0, 0,102, 0, 0, 0, 0, 0, 28, 0, 0,
+ 0, 2, 0, 0, 0,118, 0, 0, 0, 0, 0, 28, 0, 0, 0, 2,
+ 0, 0, 0,116, 0, 1, 0, 0, 0, 28, 0, 0, 0, 16, 0, 0,
+ 0, 40,102,111,114, 32,103,101,110,101,114, 97,116,111,114, 41,
+ 0, 6, 0, 0, 0, 28, 0, 0, 0, 12, 0, 0, 0, 40,102,111,
+ 114, 32,115,116, 97,116,101, 41, 0, 6, 0, 0, 0, 28, 0, 0,
+ 0, 14, 0, 0, 0, 40,102,111,114, 32, 99,111,110,116,114,111,
+ 108, 41, 0, 6, 0, 0, 0, 28, 0, 0, 0, 2, 0, 0, 0,119,
+ 0, 7, 0, 0, 0, 26, 0, 0, 0, 2, 0, 0, 0,100, 0, 7,
+ 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38,
+ 0, 0, 0, 44, 0, 0, 0, 0, 1, 0, 8, 12, 0, 0, 0, 69,
+ 0, 0, 0,133, 64, 0, 0,134,128, 64, 1,192, 0, 0, 0, 1,
+ 193, 0, 0,156, 0,129, 1, 22, 0, 0,128, 70, 64,129, 0,161,
+ 64, 0, 0, 22, 0,255,127, 94, 0, 0, 1, 30, 0,128, 0, 4,
+ 0, 0, 0, 4, 3, 0, 0, 0, 95, 71, 0, 4, 7, 0, 0, 0,
+ 115,116,114,105,110,103, 0, 4, 6, 0, 0, 0,103,102,105,110,
+ 100, 0, 4, 7, 0, 0, 0, 91, 37,119, 95, 93, 43, 0, 0, 0,
+ 0, 0, 12, 0, 0, 0, 39, 0, 0, 0, 40, 0, 0, 0, 40, 0,
+ 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0,
+ 0, 0, 41, 0, 0, 0, 40, 0, 0, 0, 41, 0, 0, 0, 43, 0,
+ 0, 0, 44, 0, 0, 0, 6, 0, 0, 0, 2, 0, 0, 0,102, 0,
+ 0, 0, 0, 0, 11, 0, 0, 0, 2, 0, 0, 0,118, 0, 1, 0,
+ 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, 40,102,111,114, 32,103,
+ 101,110,101,114, 97,116,111,114, 41, 0, 6, 0, 0, 0, 10, 0,
+ 0, 0, 12, 0, 0, 0, 40,102,111,114, 32,115,116, 97,116,101,
+ 41, 0, 6, 0, 0, 0, 10, 0, 0, 0, 14, 0, 0, 0, 40,102,
+ 111,114, 32, 99,111,110,116,114,111,108, 41, 0, 6, 0, 0, 0,
+ 10, 0, 0, 0, 2, 0, 0, 0,119, 0, 7, 0, 0, 0, 8, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 0, 0, 0, 52, 0,
+ 0, 0, 0, 2, 0, 6, 20, 0, 0, 0,133, 0, 0, 0,134, 64,
+ 64, 1,192, 0, 0, 0, 1,129, 0, 0, 65,193, 0, 0,156,128,
+ 0, 2, 0, 0, 0, 1,133, 0, 0, 0,134, 64, 64, 1,192, 0,
+ 0, 0, 1, 1, 1, 0, 65,193, 0, 0,156,128, 0, 2, 0, 0,
+ 0, 1,133, 64, 1, 0,134,128, 65, 1,192, 0, 0, 0, 0, 1,
+ 128, 0,156, 64,128, 1, 30, 0,128, 0, 7, 0, 0, 0, 4, 7,
+ 0, 0, 0,115,116,114,105,110,103, 0, 4, 5, 0, 0, 0,103,
+ 115,117, 98, 0, 4, 7, 0, 0, 0, 91, 92, 93, 92, 91, 93, 0,
+ 4, 2, 0, 0, 0, 46, 0, 4, 6, 0, 0, 0, 91, 92, 46, 93,
+ 43, 0, 4, 7, 0, 0, 0,104, 97,115,101,114,108, 0, 4, 9,
+ 0, 0, 0,115,101,116,102,105,101,108,100, 0, 0, 0, 0, 0,
+ 20, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0,
+ 48, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0, 48, 0, 0, 0,
+ 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0,
+ 49, 0, 0, 0, 49, 0, 0, 0, 49, 0, 0, 0, 51, 0, 0, 0,
+ 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0,
+ 52, 0, 0, 0, 2, 0, 0, 0, 4, 0, 0, 0,107,101,121, 0,
+ 0, 0, 0, 0, 19, 0, 0, 0, 6, 0, 0, 0,118, 97,108,117,
+ 101, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 24, 0,
+ 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0,
+ 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0,
+ 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0,
+ 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 22, 0, 0, 0, 36, 0,
+ 0, 0, 22, 0, 0, 0, 38, 0, 0, 0, 44, 0, 0, 0, 38, 0,
+ 0, 0, 46, 0, 0, 0, 52, 0, 0, 0, 46, 0, 0, 0, 52, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
diff --git a/src/haserl_lualib.lua b/src/haserl_lualib.lua
index 94e0e43..5360bd1 100644
--- a/src/haserl_lualib.lua
+++ b/src/haserl_lualib.lua
@@ -1,7 +1,6 @@
-- --------------------------------------------------------------------------
-- haserl luascript library
--- $Id: haserl.c,v 1.32 2005/11/22 15:56:42 nangel Exp $
--- Copyright (c) 2003-2007 Nathan Angelacos (nangel@users.sourceforge.net)
+-- Copyright (c) 2003-2011 Nathan Angelacos (nangel@users.sourceforge.net)
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License, version 2,
@@ -18,7 +17,7 @@
--
-- --------------------------------------------------------------------------
-haserl, FORM, ENV = {}, {}, {}
+haserl, FORM, ENV, COOKIE, HASERL, GET, POST = {}, {}, {}, {}, {}, {}, {}
function haserl.setfield (f, v)
-- From programming in Lua 1st Ed.
diff --git a/src/rfc2388.c b/src/rfc2388.c
index ea1615e..0ac4999 100644
--- a/src/rfc2388.c
+++ b/src/rfc2388.c
@@ -180,7 +180,7 @@ mime_var_putenv (list_t * env, mime_var_t * obj)
buffer_add (&buf, "_path=", 6);
buffer_add (&buf, (char *) obj->value.data,
strlen ((char *) obj->value.data) + 1);
- myputenv (env, (char *) buf.data, "HASERL_");
+ myputenv (env, (char *) buf.data, global.haserl_prefix);
buffer_reset (&buf);
/* this saves the name of the file the client supplied */