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.
This commit is contained in:
Seven Du 2019-04-24 17:52:58 +08:00 committed by Andrey Volk
parent 23e050618d
commit fe53318ef4
1 changed files with 4 additions and 2 deletions

View File

@ -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);