提交 fe53318e authored 作者: Seven Du's avatar Seven Du 提交者: Andrey Volk

FS-11721 fix send empty message

A request with no body MUST NOT include a Content-Type or any other
MIME-specific header fields.  A request without a body MUST contain
an end-line after the final header field.  No extra CRLF will be
present between the header section and the end-line.
上级 23e05061
......@@ -1538,10 +1538,12 @@ static switch_status_t switch_msrp_do_send(switch_msrp_session_t *ms, switch_msr
}
memcpy(buf + len, msrp_msg->payload, msrp_msg->payload_bytes);
len += msrp_msg->payload_bytes;
sprintf(buf + len, "\r\n");
len += 2;
}
sprintf(buf + len, "\r\n-------%s$\r\n", transaction_id);
len += (12 + strlen(transaction_id));
sprintf(buf + len, "-------%s$\r\n", transaction_id);
len += (10 + strlen(transaction_id));
if (globals.debug) dump_buffer(buf, len, __LINE__, 1);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论