[OpenSIPS-Devel] [opensips] Feature sipmsgvalidate for tofrom (#294)

Walter Doekes notifications at github.com
Mon Aug 11 10:42:54 CEST 2014


> +        if ((hdrs_len+2<=msg->len) && (strncmp(CRLF,msg->unparsed,CRLF_LEN)==0) )
> +            body.s = msg->unparsed + CRLF_LEN;
> +        else if ( (hdrs_len+1<=msg->len) &&
> +                (*(msg->unparsed)=='\n' || *(msg->unparsed)=='\r' ) )
> +            body.s = msg->unparsed + 1;
> +        else {
> +            /* no body */
> +            body.s = NULL;
> +            body.len = 0;
> +        }
> +
> +        /* determine the length of the body */
> +        body.len = msg->buf + msg->len - body.s;
> +
> +        if (get_content_length(msg) != body.len) {
> +            snprintf(reason, MAX_REASON-1, "invalid body - content length %ld different then "

different *than

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/294/files#r16042525
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20140811/495fa521/attachment.htm>


More information about the Devel mailing list