|
@@ -169,6 +169,11 @@ int extract_body(struct sip_msg *msg, str *body )
|
|
|
* parcing as get_body() parsed all headers and Conten-Length
|
|
|
* body header is automaticaly parsed when found.
|
|
|
*/
|
|
|
+ if (msg->content_length==0) {
|
|
|
+ LM_ERR("failed to get the content length in message\n");
|
|
|
+ goto error;
|
|
|
+ }
|
|
|
+
|
|
|
body->len = get_content_length(msg);
|
|
|
if (body->len==0) {
|
|
|
LM_ERR("message body has length zero\n");
|