[OpenSIPS-Devel] [opensips] 400 Bad Request (Invalid content length X / Y) (#358)

Lead Developer notifications at github.com
Wed Oct 15 14:19:09 CEST 2014


Hi,

It seems OpenSIPS (11.1.1) is incorrectly parsing body of MESSAGE requests which end with one, two or three digits. For example, the following three body contents will result in:

REQUEST:
<pre>
MESSAGE MESSAGE sip:bob at example.com SIP/2.0
[SIP headers]
test 1
</pre>

RESPONSE:
<pre>
SIP/2.0 400 Bad Request (Invalid content length 5 / 6)
[SIP headers]
</pre>


REQUEST:
<pre>
MESSAGE MESSAGE sip:bob at example.com SIP/2.0
[SIP headers]
test 12
</pre>

RESPONSE:
<pre>
SIP/2.0 400 Bad Request (Invalid content length 5 / 7)
[SIP headers]
</pre>


REQUEST:
<pre>
MESSAGE MESSAGE sip:bob at example.com SIP/2.0
[SIP headers]
test 123
</pre>

RESPONSE:
<pre>
SIP/2.0 400 Bad Request (Invalid content length 5 / 8)
[SIP headers]
</pre>


four and more digits as last characters are working OK:

REQUEST:
<pre>
MESSAGE MESSAGE sip:bob at example.com SIP/2.0
[SIP headers]
test 1234
</pre>

RESPONSE:
<pre>
SIP/2.0 200 OK
[SIP headers]
</pre>

Regards,
Chris

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/358
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20141015/7923ee04/attachment.htm>


More information about the Devel mailing list