[sr-dev] git:master: modules_k/msilo: send composed body only if content type is text/plain

Juha Heinanen jh at tutpro.com
Mon Oct 5 14:14:54 CEST 2009


Module: sip-router
Branch: master
Commit: 64e15b63e449d26e9c56ee28b3fde22d069e03e6
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=64e15b63e449d26e9c56ee28b3fde22d069e03e6

Author: Juha Heinanen <jh at tutpro.com>
Committer: Juha Heinanen <jh at tutpro.com>
Date:   Mon Oct  5 15:13:56 2009 +0300

modules_k/msilo: send composed body only if content type is text/plain

---

 modules_k/msilo/msilo.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/modules_k/msilo/msilo.c b/modules_k/msilo/msilo.c
index 58f31a1..7c9cefa 100644
--- a/modules_k/msilo/msilo.c
+++ b/modules_k/msilo/msilo.c
@@ -1044,7 +1044,13 @@ static int m_dump(struct sip_msg* msg, char* owner, char* str2)
 			
 		/** sending using TM function: t_uac */
 		body_str.len = 1024;
-		n = m_build_body(&body_str, rtime, str_vals[2/*body*/], 0);
+		/* send composed body only if content type is text/plain */
+		if ((str_vals[3].len == 10) &&
+		    (strncmp(str_vals[3].s, "text/plain", 10) == 0)) {
+		    n = m_build_body(&body_str, rtime, str_vals[2/*body*/], 0);
+		} else {
+		    n = -1;
+		}
 		if(n<0)
 			LM_DBG("sending simple body\n");
 		else




More information about the sr-dev mailing list