From 22a416d8ae9ece1fb00d132f98f1bfc18b5f578d Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Wed, 21 Mar 2018 16:07:13 +0100 Subject: [PATCH] use content type boundary parmater --- src/content/content-manager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/content/content-manager.cpp b/src/content/content-manager.cpp index 056ba6f52..a87760be7 100644 --- a/src/content/content-manager.cpp +++ b/src/content/content-manager.cpp @@ -32,9 +32,10 @@ LINPHONE_BEGIN_NAMESPACE // ----------------------------------------------------------------------------- list ContentManager::multipartToContentList (const Content &content) { + string boundary = content.getContentType.getParameter("boundary").empty() ? MultipartBoundary : content.getContentType.getParameter("boundary"); const string body = content.getBodyAsString(); belle_sip_multipart_body_handler_t *mpbh = belle_sip_multipart_body_handler_new_from_buffer( - body.c_str(), body.length(), MultipartBoundary + body.c_str(), body.length(), boundary.c_str() ); belle_sip_object_ref(mpbh); @@ -108,7 +109,7 @@ Content ContentManager::contentListToMultipart (const list &contents, c belle_sip_object_unref(mpbh); ContentType contentType = ContentType::Multipart; - contentType.addParameter("boundary", string(boundary)); + contentType.addParameter("boundary", boundary); content.setContentType(contentType); return content;