Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#52 Inserting Content-Type Header Wrongly

1.4.x
closed-fixed
Anca Vamanu
modules (454)
5
2008-11-21
2008-11-21
Anonymous
No

Inserting Content-Type header wrongly as per syntax.
Content-Type: "multipart/related;type="application/rlmi+xml";start= <1227170190.sip:s3-1@192.168.166.150.100461836>;boundary=bJVARonZbIIuteNTNq6iNU46

The correct way is as follows

Content-Type: multipart/related;type="application/rlmi+xml";start= "<1227263305.sip:s3-1@192.168.166.150.1633791553>";boundary=dXAwGlXKOFXQ6rSATAbvSdga

code to change

/* old code: str_hdr->len+= sprintf(str_hdr->s+str_hdr->len,
"Content-Type: \"multipart/related;type=\"application/rlmi+xml\"");
str_hdr->len+= sprintf(str_hdr->s+str_hdr->len,
";start= <%s>;boundary=%s\r\n", start_cid, boundary_string);*/
new changes:
str_hdr->len+= sprintf(str_hdr->s+str_hdr->len,
"Content-Type: multipart/related;type=\"application/rlmi+xml\"");
str_hdr->len+= sprintf(str_hdr->s+str_hdr->len,
";start= \"<%s>\";boundary=%s\r\n", start_cid, boundary_string);

Sample Msg:

NOTIFY sip:192.168.166.150:50604 SIP/2.0
Via: SIP/2.0/UDP 10.6.2.246:4343;branch=z9hG4bK993d.15a823c3.0
To: sip:s3-1@192.168.166.150;tag=s+1+1440000+5882a317
From: sip:s3-1@192.168.166.150;tag=10.21683.1227170190.0
CSeq: 1 NOTIFY
Call-ID: DD18E458@s
Content-Length: 524
User-Agent: OpenSIPS (1.4.2-notls (i386/linux))
Max-Forwards: 70
Event: presence
Contact: <sip:10.6.2.246:4343;transport=udp>
Subscription-State: active;expires=360
Require: eventlist
Content-Type: "multipart/related;type="application/rlmi+xml";start= <1227170190.sip:s3-1@192.168.166.150.100461836>;boundary=bJVARonZbIIuteNTNq6iNU46

--bJVARonZbIIuteNTNq6iNU46
Content-Transfer-Encoding: binary
Content-ID: <1227170190.sip:s3-1@192.168.166.150.100461836>
Content-Type: application/rlmi+xml;charset="UTF-8r"

<?xml version="1.0"?>
<list uri="sip:s3-1@192.168.166.150" xmlns="urn:ietf:params:xml:ns:rlmi" version="1" fullState="true">
<resource uri="sip:c3-1@192.168.166.150"/>
<resource uri="sip:c3-2@192.168.166.150"/>
<resource uri="sip:c3-3@192.168.166.150"/>
<resource uri="sip:c3-4@192.168.166.150"/>
</list>

Discussion

  • Anca Vamanu
    Anca Vamanu
    2008-11-21

    Hi,

    This is already fixed in svn branch 1.4.x. As I already mentioned in the other bug report, I advise you to take this module from there.

    Thanks and regards,
    Anca

     
  • Anca Vamanu
    Anca Vamanu
    2008-11-21

    • assigned_to: nobody --> anca_vamanu
    • status: open --> closed-fixed