[Pidgin] #965: SIMPLE Messages truncate the last 2 characters because they have the wrong content length
Pidgin
trac at pidgin.im
Sun May 13 17:11:12 EDT 2007
#965: SIMPLE Messages truncate the last 2 characters because they have the wrong
content length
--------------------+-------------------------------------------------------
Reporter: mdknapp | Owner: datallah
Type: defect | Status: new
Priority: minor | Component: winpidgin (gtk)
Version: 2.0 | Keywords: SIMPLE SIP CONTENT SIZE
Pending: 0 |
--------------------+-------------------------------------------------------
It appears that the SIMPLE messages have the wrong computed content length
causing a failure in interop with OpenSer. In the wire capture below (with
identities changed but length maintained) the Content-Length should be 272
characters but the Content-Length reports 270.
With OpenSer this results in the last two characters of the message being
truncated causing corrupting regular text messages and im-iscomposing+xml
data. In the case of im-iscomposing+xml OpenSer returns a "415 Unsupported
media type" because the "<presence>" tag is closed as "</presence"
according to the OpenSer because it honors the Content-Length and then the
xml parsers complain.
=====
{{{
PUBLISH sip:privat at sip.privatedom.com SIP/2.0\r\n
Via: SIP/2.0/UDP
00.00.000.000:5060;branch=z9hG4bK0FF656BA66284BFC5748\r\n
From:
<sip:privat at sip.privatedom.com>;tag=412110970;epid=1234567890\r\n
To: <sip:privat at sip.privatedom.com>\r\n
Max-Forwards: 10\r\n
CSeq: 3 PUBLISH\r\n
User-Agent: Purple/2.0.0\r\n
Call-ID: 5B40g56DBa14C4i2FE0m0767t2BA8b66DAx2CECx\r\n
Expires: 600\r\n
Event: presence\r\n
Content-Type: application/pidf+xml\r\n
Content-Length: 270\r\n
Authorization: Digest username="privat", realm="sip.privatedom.com",
nonce="463f6d537189a3a7693039105223e7a97b27eb68",
uri="sip:privat at sip.privatedom.com", nc="00000001",
response="4f243b0ff52749c2e0da04410f06c8cc"\r\n
\r\n
\r\n
<?xml version="1.0" encoding="UTF-8"?>\n
<presence xmlns="urn:ietf:params:xml:ns:pidf"\n
xmlns:im="urn:ietf:params:xml:ns:pidf:im"\n
entity="sip:privat at sip.privatedom.com">\n
<tuple id="bs35r9f">\n
<status>\n
<basic>open</basic>\n
</status>\n
<note>available</note>\n
</tuple>\n
</presence>
}}}
--
Ticket URL: <http://developer.pidgin.im/ticket/965>
Pidgin <http://pidgin.im>
Pidgin
More information about the Tracker
mailing list