From: Anthony Minessale Date: Wed, 22 Sep 2010 21:05:44 +0000 (-0500) Subject: let ~ signify that multipart content will contain headers X-Git-Tag: v1.2-rc1~291^2~40^2~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3548168d8ff14630914b79645f22433c2a5243ca;p=thirdparty%2Ffreeswitch.git let ~ signify that multipart content will contain headers --- diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c index e945c0dd13..519cb3d3f9 100644 --- a/src/mod/endpoints/mod_sofia/sofia_glue.c +++ b/src/mod/endpoints/mod_sofia/sofia_glue.c @@ -1527,7 +1527,11 @@ char *sofia_glue_get_multipart(switch_core_session_t *session, const char *prefi if (!strncasecmp(name, prefix, strlen(prefix))) { const char *hname = name + strlen(prefix); - stream.write_function(&stream, "--%s\nContent-Type: %s\nContent-Length: %d\n\n%s\n", boundary, hname, strlen(value) + 1, value); + if (*value == '~') { + stream.write_function(&stream, "--%s\nContent-Type: %s\nContent-Length: %d\n%s\n", boundary, hname, strlen(value), value + 1); + } else { + stream.write_function(&stream, "--%s\nContent-Type: %s\nContent-Length: %d\n\n%s\n", boundary, hname, strlen(value) + 1, value); + } x++; } }