<p><a href="https://github.com/ionutrazvanionita" class="user-mention">@ionutrazvanionita</a> , the best approach is to actually parse ehdrs in a SIP-wise manner : <br>
/* use SIP parser to look at what is in the FIFO request */<br>
memset( &tmp_msg, 0, sizeof(struct sip_msg));<br>
tmp_msg.len = hdrs->len;<br>
tmp_msg.buf = tmp_msg.unparsed = hdrs->s;<br>
if (parse_headers( &tmp_msg, HDR_EOH_F, 0) == -1 )<br>
return init_mi_tree( 400, "Bad headers", 11);</p>
<p>(see modules/tm/tm.c +473 )</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/issues/403#issuecomment-70886597">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOciRWIVMBruJCZx0Y5ukAHw4UR_51bks5nj98wgaJpZM4DSv_t.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/OpenSIPS/opensips/issues/403#issuecomment-70886597"></link>
<meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>