[SR-Users] Extending has_body() with additional mime types

Giacomo Vacca giacomo.vacca at gmail.com
Tue May 31 12:50:45 CEST 2016


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160531/099cee7e/attachment.html>


More information about the sr-users mailing list