Skip to content

Commit

Permalink
Compatibility fix for add_body() with new body.
Browse files Browse the repository at this point in the history
When computing the new content-len, accept the case when there is no pre-existing body and a newly added body.
Reported by Antonis Psaras via LinkedIn

(cherry picked from commit 8054dbf)

Conflicts:
	msg_translator.c
  • Loading branch information
bogdan-iancu committed Oct 15, 2014
1 parent 10a584b commit 9d951b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions msg_translator.c
Expand Up @@ -326,8 +326,8 @@ char* clen_builder(struct sip_msg* msg, int *clen_len, int diff)
char *buf, * value_s;
int len, value, value_len;
str body;
if ( (get_body(msg,&body)!=0) || body.len==0 ) {

if ( (get_body(msg,&body)!=0) ) {
ser_error=E_BAD_REQ;
LM_ERR("no message body found (missing crlf?)");
return 0;
Expand Down

0 comments on commit 9d951b0

Please sign in to comment.