<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hello,</p>
<p>I think c. is the more useful one to have.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<br>
<div class="moz-cite-prefix">On 31/05/16 12:50, Giacomo Vacca wrote:<br>
</div>
<blockquote
cite="mid:CAO6UKa2ANEmJKSVnfx9dtW85q6bkdig9pY0b3bc2RYeqLrGe1Q@mail.gmail.com"
type="cite">
<div dir="ltr">Hi all,
<div>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.</div>
<div><br>
</div>
<div>As a practical example, has_body("application/vq-rtcpxr")
was returning 1 for Content-Type
"application/dialog-info+xml".</div>
<div><br>
</div>
<div>The interpretation is that they are both unknown and so
they match.</div>
<div><br>
</div>
<div>Using 'if ($cT == "application/vq-rtcpxr)" provides a work
around, but I wonder what's the suggested solution for this?</div>
<div><br>
</div>
<div>a. Add the missing mime types (from RFC 6035 and 4235
respectively) to the list</div>
<div>b. Instead of returning 1, return another code, e.g. 2,
when the mime type is unknown</div>
<div>c. Switch to string comparison when the mime type is
unknown</div>
<div>d. Something else?</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Giacomo</div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a> - <a class="moz-txt-link-freetext" href="http://www.kamailio.org">http://www.kamailio.org</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
</body>
</html>