< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

Re: [reSIProcate] [reSIProcate-users] Bug report


Moving this to resip-devel:

Hmm, it looks like we're tripping over the code that is meant to distinguish "Accept: " from the absence of an Accept header (or other headers of that type; Allow, Allow-Events, etc). These are all multi-value headers.

Should we really be doing this for single-value headers? I don't think we should. If we get a single value header that is empty, we should not be representing it as an empty list. Can anyone think of a counter-example where an empty single-value header needs to be fundamentally conceptually different than a normal single-value header?

Best regards,
Byron Campen

Thank you Byron, but same problem, this is my code:

        Data subject;

        if (sub.exists(h_Subject)==true && sub.header(h_Subject).isWellFormed()==true)
        {
            subject = sub.header(h_Subject).value();
        }


On Thu, Jul 24, 2008 at 10:42 PM, Byron Campen <bcampen@xxxxxxxxxxxx> wrote:
You need to throw in a sub.header(h_Subject).isWellFormed() in that check, ie:

        Data subject;

        if (sub.exists(h_Subject)==true && sub.header(h_Subject).isWellFormed() && sub.header(h_Subject).value().empty()==false)

        {
            subject = sub.header(h_Subject).value();
        }

Best regards,
Byron Campen

Hi all, I think I found a bug:

1: I using the counterpath Bria to send a presence SUBSCRIBE to my UA.
2: I use wireshark to capture the SUBSCRIBE message, saw it has Subject header, but this header value is empty.
 
3: onNewSubscription(ServerSubscriptionHandle h, const SipMessage& sub)  call back is fired, then I use this code to access the Subject header:

        Data subject;

        if (sub.exists(h_Subject)==true && sub.header(h_Subject).value().empty()==false)
        {
            subject = sub.header(h_Subject).value();
        }

When running to sub.header(h_Subject).value().empty()==false, the VC2005 debuger go to dialogusagemanager.cxx line 1778:

            catch (BaseException& e)
            {
               SipMessage failure;   <----------- it's go to here
               makeResponse(failure, request, 400, e.getMessage());
               failure.header(h_AcceptLanguages) = getMasterProfile()->getSupportedLanguages();
               sendResponse(failure);
            }


If  the subject header value is not empty, then all are ok.

thanks
_______________________________________________
resiprocate-users mailing list
resiprocate-users@xxxxxxxxxxxxxxx
List Archive: http://list.resiprocate.org/archive/resiprocate-users/



Attachment: smime.p7s
Description: S/MIME cryptographic signature