Re: Possible bug in Subject Headers
"M. Rangnathan" <[email protected]> Sun, 22 Apr 2007 22:22:38 -0400
| Newsgroups | gmane.comp.voip.nist-sip |
|---|---|
| Message-ID | <[email protected]> |
request.setHeader(newSubjectHeader) may work as intended. Add is supposed to be for lists of headers. As there can only be a single subject header, the second one is ignored. Call it a clunkiness in the API. Ranga Andrew T Gin wrote: > Hi > Ranga, when you mean you want us to use the user list on java.net, are > you referring to [email protected]? > > I think I may have come across a possible bug when it comes to adding > subject headers. Can the subject header change midway through a session? > > I have a session established with a subject header. > I add SubjectHeaders using > > request.addHeader(subjectHeader). > > However when I come to create another request (using the same > session), and I again add a subject header with a different subject: > > request.addHeader(subjectHeader) > > the subject header added is the previous one, not the newly created > one! At the moment I am getting around this by using > request.addHeader(subjectHeader); //this adds the previously used > subject header, even though a new one was created! > request.removeHeader(SubjectHeader.NAME); //to remove the subject > header just added > request.addHeader(subjectHeader); //adding the new one a second time > adds it correctly. > > The RFC does not state that Subject headers cannot change during a > session/call (section 20.36 of RFC 3261), however it may allude to it > "...The Subject header field provides a summary or indicates the > nature of the call ..." > > Jeroem, your suggestion of removing the via header works! thanks a lot! > _______________________________________________ > nist-sip mailing list > [email protected] > http://www-x.antd.nist.gov/mailman/listinfo/nist-sip -- M. Ranganathan Advanced Networking Technologies Division, National Institute of Standards and Technology (NIST), 100 Bureau Drive, Stop 8920, Gaithersburg, MD 20899. tel:301 975 3664 , fax:301 590 0932 http://w3.antd.nist.gov/ Advanced Networking Technologies For the People!