diff --git a/channels/chan_sip.c b/channels/chan_sip.c index ebbafbeb6d..e4f95b7be3 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -11575,8 +11575,8 @@ static void receive_message(struct sip_pvt *p, struct sip_request *req) struct ast_frame f; const char *content_type = get_header(req, "Content-Type"); - if (strcmp(content_type, "text/plain")) { /* No text/plain attachment */ - transmit_response(p, "415 Unsupported Media Type", req); + if (strncmp(content_type, "text/plain", strlen("text/plain"))) { /* No text/plain attachment */ + transmit_response(p, "415 Unsupported Media Type", req); /* Good enough, or? */ if (!p->owner) sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT); return;