MT#56728 avoid doublequotes on SDP boundary

Strip doublequotes on SDP boundary when the Content-Type header
contains them.

for example:
Content-Type: multipart/mixed;boundary="unique-boundary-1"

will now produce something like that

--unique-boundary-1
Content-Type: application/sdp

v=0
o=user1 53655765 2353687637 IN IP4 10.0.0.179
s=-
c=IN IP4 10.0.0.179
t=0 0
m=audio 30000 RTP/AVP 8
a=rtpmap:8 PCMA/8000
a=sendrecv
a=rtcp:30001
a=ptime:50

--unique-boundary-1
Content-Type: application/vnd.cirpack.isdn-ext
Content-Disposition: signal;handling=required

...

and not
--"unique-boundary-1"

Change-Id: I2efb749c6ff9be4e8ccde62bcf544c72cdb5ad6e
mr11.3.1
Daniel Grotti 4 years ago
parent eb60a005dd
commit 2b496037fa

@ -810,6 +810,13 @@ void AmMimeBody::print(string& buf) const
for(Parts::const_iterator it = parts.begin();
it != parts.end(); ++it) {
if (ct.mp_boundary != NULL && ct.mp_boundary->value.at(0) == '"' && ct.mp_boundary->value.back() == '"' )
{
DBG("Stripping doublequotes at the beginning and at the end of the boundary");
ct.mp_boundary->value.erase(0,1);
ct.mp_boundary->value.erase(ct.mp_boundary->value.size() - 1);
}
buf += "--" + (ct.mp_boundary != NULL ? ct.mp_boundary->value : string("") ) + CRLF;
buf += SIP_HDR_CONTENT_TYPE COLSP + (*it)->getCTHdr() + CRLF;
buf += (*it)->hdrs + CRLF;

Loading…
Cancel
Save