Browse code

Merge a3a351c8b76abdd3da73b619456dc2e61c3778c1 into f7965fc52f0c9b65b78004ee68b9a9b5e6222a98

Ivan Aponte authored on 13/10/2021 06:09:42 • GitHub committed on 13/10/2021 06:09:42
Showing 1 changed files
... ...
@@ -3267,6 +3267,7 @@ int build_sip_msg_from_buf(struct sip_msg *msg, char *buf, int len,
3267 3267
 int sip_msg_update_buffer(sip_msg_t *msg, str *obuf)
3268 3268
 {
3269 3269
 	sip_msg_t tmp;
3270
+	int res;
3270 3271
 
3271 3272
 	if(obuf==NULL || obuf->s==NULL || obuf->len<=0) {
3272 3273
 		LM_ERR("invalid buffer parameter\n");
... ...
@@ -3329,6 +3330,13 @@ int sip_msg_update_buffer(sip_msg_t *msg, str *obuf)
3329 3330
 		return 0;
3330 3331
 	}
3331 3332
 
3333
+	//parse all the headers again
3334
+	res = parse_headers(msg, HDR_EOH_F, 0);
3335
+	if (res == -1) {
3336
+		LM_ERR("Error while parsing headers (%d)\n", res);
3337
+		return 0;
3338
+	}
3339
+
3332 3340
 	return 1;
3333 3341
 }
3334 3342