[reSIProcate] [reSIProcate-users] Bug report

Byron Campen bcampen at estacado.net
Thu Jul 24 10:04:42 CDT 2008


	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 at estacado.net> 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 at resiprocate.org
>> List Archive: http://list.resiprocate.org/archive/resiprocate-users/
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20080724/08cee5b0/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2423 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20080724/08cee5b0/attachment.bin>


More information about the resiprocate-devel mailing list