<p>Analyzed the code and the match was happening anyhow because the case for match last part of "Reason:" is having IF conditions to cover the last three bytes, instead of the full 4 bytes value - inside parser/case_reas.h:</p>

<pre><code>    if ((LOWER_DWORD(val)&0x00ffffff) ==\
                (_on1_&0x00ffffff)){    \
            hdr->type = HDR_REASON_T;   \
            hdr->name.len = 6;          \
            return (p+3);               \
    }
</code></pre>

<p>I am going to merge manually, to adjust the commit message. Also, I will push some other patches to make the use of parse_hname2() safer for fixups and parsing when only the header name is in the input buffer.</p>

<p>Given that the header name parsing became again actual, I may revive my plans to rework it with a better approach.</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/kamailio/kamailio/pull/308#issuecomment-137021784">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZVNx40dEXXpSNZ_VhqUARfVCU6Gmks5otskLgaJpZM4F0yRV.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/kamailio/kamailio/pull/308#issuecomment-137021784"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>