[SR-Users] Extending has_body() with additional mime types
Daniel-Constantin Mierla
miconda at gmail.com
Tue May 31 13:06:19 CEST 2016
Hello,
I think c. is the more useful one to have.
Cheers,
Daniel
On 31/05/16 12:50, Giacomo Vacca wrote:
> Hi all,
> apologies if this is an old topic but I've noticed that has_body() can
> provide false positives and would like to discuss a solution.
>
> As a practical example, has_body("application/vq-rtcpxr") was
> returning 1 for Content-Type "application/dialog-info+xml".
>
> The interpretation is that they are both unknown and so they match.
>
> Using 'if ($cT == "application/vq-rtcpxr)" provides a work around, but
> I wonder what's the suggested solution for this?
>
> a. Add the missing mime types (from RFC 6035 and 4235 respectively) to
> the list
> b. Instead of returning 1, return another code, e.g. 2, when the mime
> type is unknown
> c. Switch to string comparison when the mime type is unknown
> d. Something else?
>
> Thanks,
> Giacomo
>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://www.asipto.com - http://www.kamailio.org
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160531/d5f8acb0/attachment.html>
More information about the sr-users
mailing list