Skip to content

Commit 7394b1e

Browse files
authored
pjsip_find_msg: Log warning if Content-Length field not found (#3960)
1 parent 1dab9b6 commit 7394b1e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pjsip/src/pjsip/sip_parser.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -937,6 +937,8 @@ PJ_DEF(pj_status_t) pjsip_find_msg( const char *buf, pj_size_t size,
937937

938938
/* Found Content-Length? */
939939
if (content_length == -1) {
940+
/* As per RFC3261 7.4.2, 7.5, 20.14, Content-Length is mandatory over TCP. */
941+
PJ_LOG(2, (THIS_FILE, "Field Content-Length not found!"));
940942
return status;
941943
}
942944

0 commit comments

Comments
 (0)