[SR-Users] textops module get_body_part function gives boundary error even if not multipart
YAS0 CANER
caner_yaso at hotmail.com
Fri Nov 16 12:18:30 CET 2018
Hello,
i try to get content from Invite request but it gives boundary error. it is not multipart or mixed content but it checks boundary and gives error.
Thanks.
My message
INVITE
Content-Type: application/resource-lists+xml
<resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists">
<list>
<entry uri="100?Call-ID=$calli&From=$fromtag&To=$toTag&Session-ID=1"/>
<entry uri="103?Call-ID=$calli2&From=$fromtag2&To=$toTag2&Session-ID=2"/>
</list>
</resource-lists>
static int ki_get_body_part_helper(sip_msg_t* msg, str* ctype, pv_spec_t *dst,
int mode)
{
...
if(get_boundary(msg, &boundary)!=0) {
LM_ERR("Cannot get boundary. Is body multipart?\n");
return -1;
}
....
int get_boundary(struct sip_msg* msg, str* boundary)
params.s = memchr(msg->content_type->body.s, ';',msg->content_type->body.len);
if (params.s == NULL)
{
LM_INFO("Content-Type hdr has no params <%.*s>\n",
msg->content_type->body.len, msg->content_type->body.s);
return -1;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20181116/654ab89e/attachment.html>
More information about the sr-users
mailing list