From d1893f3fd8bb21521bf18004d021840e114a54bd Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Fri, 20 Dec 2013 09:23:57 -0500 Subject: [PATCH] add strip_trailing_crlf option to tcap --- debian/patches/sipwise/tcap.patch | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/patches/sipwise/tcap.patch b/debian/patches/sipwise/tcap.patch index 51e19d97d..8258e829d 100644 --- a/debian/patches/sipwise/tcap.patch +++ b/debian/patches/sipwise/tcap.patch @@ -12,7 +12,7 @@ +include ../../Makefile.modules --- /dev/null +++ b/modules/tcap/tcap_mod.c -@@ -0,0 +1,231 @@ +@@ -0,0 +1,239 @@ +#include +#include +#include @@ -29,6 +29,7 @@ + + +static str content_type; ++static int strip_trailing_crlf; + + + @@ -53,6 +54,7 @@ + +static param_export_t params[] = { + { "content_type", STR_PARAM, &content_type.s }, ++ { "strip_trailing_crlf", INT_PARAM, &strip_trailing_crlf }, + { 0, } +}; + @@ -101,6 +103,12 @@ + if (!body->len) + goto error; + ++ if (strip_trailing_crlf ++ && body->len >= 2 ++ && body->s[body->len - 1] == '\n' ++ && body->s[body->len - 2] == '\r') ++ body->len -= 2; ++ + err = "No Content-Type found"; + if (!msg->content_type) + goto error;