summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNathan Angelacos <nangel@alpinelinux.org>2015-02-15 23:10:17 +0000
committerNathan Angelacos <nangel@alpinelinux.org>2015-02-15 23:10:17 +0000
commit22275203cc9f97b79ffdedcbe6b51e0086fa8cb6 (patch)
tree075d23cf40bf05ef77aabf9543ad09f0143d65e9 /src
parenta4474474e11094d5d9a227171b35ab0e90c0a60c (diff)
downloadhaserl-22275203cc9f97b79ffdedcbe6b51e0086fa8cb6.tar.bz2
haserl-22275203cc9f97b79ffdedcbe6b51e0086fa8cb6.tar.xz
Version bump to 0.9.34
Fixes for Lua 5.3 compatibility Move sys/fnctl.h to fnctl.h Applied Victor Cook's patch to rfc2388.c regarding crlf positioning in header data
Diffstat (limited to 'src')
-rw-r--r--src/h_bash.c2
-rw-r--r--src/h_lua.c2
-rw-r--r--src/h_script.c2
-rw-r--r--src/lua2c.c5
-rw-r--r--src/rfc2388.c14
5 files changed, 21 insertions, 4 deletions
diff --git a/src/h_bash.c b/src/h_bash.c
index e955acd..1ceee9a 100644
--- a/src/h_bash.c
+++ b/src/h_bash.c
@@ -30,7 +30,7 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/stat.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/h_lua.c b/src/h_lua.c
index e7fb2b4..19d7eb9 100644
--- a/src/h_lua.c
+++ b/src/h_lua.c
@@ -30,7 +30,7 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/stat.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/h_script.c b/src/h_script.c
index 534c672..5d5cf4e 100644
--- a/src/h_script.c
+++ b/src/h_script.c
@@ -26,7 +26,7 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
diff --git a/src/lua2c.c b/src/lua2c.c
index 063ac20..261239a 100644
--- a/src/lua2c.c
+++ b/src/lua2c.c
@@ -78,7 +78,12 @@ writer (lua_State * L, const void *p, size_t size, void *u)
static void
dumpit ()
{
+#if LUA_VERSION_NUM >= 503
+ lua_dump (lua_vm, writer, NULL, 0);
+#else
lua_dump (lua_vm, writer, NULL);
+#endif
+
}
diff --git a/src/rfc2388.c b/src/rfc2388.c
index 971a2e1..621672c 100644
--- a/src/rfc2388.c
+++ b/src/rfc2388.c
@@ -399,6 +399,8 @@ rfc2388_handler (list_t * env)
buffer_t buf;
mime_var_t var;
+ int header_continuation;
+
/* prevent a potential unitialized free() - ISE-TPS-2014-008 */
var.name = NULL;
@@ -449,6 +451,9 @@ rfc2388_handler (list_t * env)
state = DISCARD;
str = boundary + 2; /* skip the leading crlf */
+
+ header_continuation = 0;
+
do
{
/* x is true if this token ends with a matchstr or is at the end of stream */
@@ -501,6 +506,7 @@ rfc2388_handler (list_t * env)
buffer_reset (&buf);
mime_var_init (&var);
state = HEADER;
+ header_continuation = 0;
str = crlf;
}
}
@@ -510,7 +516,7 @@ rfc2388_handler (list_t * env)
buffer_add (&buf, sbuf.segment, sbuf.len);
if (x)
{
- if (sbuf.len == 0)
+ if (sbuf.len == 0 && header_continuation == 0)
{ /* blank line */
buffer_reset (&buf);
state = CONTENT;
@@ -522,7 +528,13 @@ rfc2388_handler (list_t * env)
mime_tag_add (&var, (char *) buf.data);
buffer_reset (&buf);
}
+ header_continuation = 0;
}
+ else
+ {
+ // expect more data
+ header_continuation = 1;
+ }
break;
case CONTENT: