[OpenSIPS-Users] bogus to header in rls subscribe

Juha Heinanen jh at tutpro.com
Thu Jun 10 18:39:35 CEST 2010


anca,

i did some debugging related to the bogus multipart/related mime header
in rls subscribe.

i turned LM_DBG to LM_INFO in rls_send_notify just before the request is
sent out:

	LM_INFO("str_hdr= %.*s\n", str_hdr.len, str_hdr.s);
	rt = tmb.t_request_within
		(&met,
		&str_hdr,
		body,
		td,
		rls_notify_callback,
		(void*)cb_param,
		NULL);

and i get correct ;start param value to syslog:

Jun 10 19:22:37 localhost /usr/sbin/pres-serv[2791]: INFO:rls:rls_send_notify: str_hdr= Max-Forwards: 70#015#012Event: presence#015#012Contact: <sip:rls at 127.0.0.1:5082>#015#012Subscription-State: active;expires=610#015#012Require: eventlist#015#012Content-Type: multipart/related;type="application/rlmi+xml";start="<1276186957.sip:test-buddies at test.fi.1485747673>";boundary="DOnISlbiHefIxEvussNtWfLH"#015#012

wireshark, however still tells that the param value is incorrect:

        Content-Type: multipart/related;type="application/rlmi+xml";start="<1276186957\r\n\r\n
        The multipart dissector could not find the required boundary parameter.
        Data (411 bytes)

0000  2d 2d 44 4f 6e 49 53 6c 62 69 48 65 66 49 78 45   --DOnISlbiHefIxE
0010  76 75 73 73 4e 74 57 66 4c 48 0d 0a 43 6f 6e 74   vussNtWfLH..Cont
0020  65 6e 74 2d 54 72 61 6e 73 66 65 72 2d 45 6e 63   ent-Transfer-Enc
0030  6f 64 69 6e 67 3a 20 62 69 6e 61 72 79 0d 0a 43   oding: binary..C
...

could it be that there is a bug in t_request_within?

by the way, i think there is a an extra space after ;start= in the
original version:

Content-Type: multipart/related;type="application/rlmi+xml";start= "<127550059\r\n\r\n

the code is this:

memcpy(p, ";start= \"<", 10);

i changed it to

		memcpy(p, ";start=\"<", 9);

which eliminated the extra space, but of course that has nothing to do
with the start value problem.  perhaps you could commit this change
anyway.

-- juha



More information about the Users mailing list