Fixed message body build buffer to deal with additional body headers and mime multiparts.
git-svn-id: http://yate.null.ro/svn/yate/trunk@1619 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
aebce4e29d
commit
dfa59997e3
|
@ -566,8 +566,11 @@ const DataBlock& SIPMessage::getBuffer() const
|
|||
m_data.assign((void*)(getHeaders().c_str()),getHeaders().length());
|
||||
if (body) {
|
||||
String s;
|
||||
body->getType().buildLine(s);
|
||||
s << "\r\nContent-Length: " << body->getBody().length() << "\r\n\r\n";
|
||||
body->buildHeaders(s);
|
||||
s << "Content-Length: " << body->getBody().length() << "\r\n";
|
||||
// The multipart will add an empty line anyway
|
||||
if (!body->isMultipart())
|
||||
s << "\r\n";
|
||||
m_data += s;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue