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

RE: [reSIProcate] NameAddr::parse() bug?


Thanks for info Robert.  Yes - the fix allow for what you mentioned.
Here are the test vectors I added to testUri:

    NameAddr sip1("\"DispName\" <sip:user@xxxxxxxx>");
    NameAddr sip2("\"DispName \"<sip:user@xxxxxxxx>");
    NameAddr sip3("\"  DispName\"<sip:user@xxxxxxxx>");
    NameAddr sip4("DispName <sip:user@xxxxxxxx>");
    NameAddr sip5("DispName<sip:user@xxxxxxxx>");
    NameAddr sip6("  DispName <sip:user@xxxxxxxx>");
    NameAddr sip7("  DispName<sip:user@xxxxxxxx>");
    NameAddr sip8("  Disp Name  <sip:user@xxxxxxxx>");

    assert( sip1.displayName() == Data("DispName") );
    assert( sip2.displayName() == Data("DispName ") );
    assert( sip3.displayName() == Data("  DispName") );
    assert( sip4.displayName() == Data("DispName") );  
    assert( sip5.displayName() == Data("DispName") );
    assert( sip6.displayName() == Data("DispName") );  
    assert( sip7.displayName() == Data("DispName") ); 
    assert( sip8.displayName() == Data("Disp Name") );

Scott Godin

> -----Original Message-----
> From: Robert Sparks [mailto:rjsparks@xxxxxxxxxxx]
> Sent: Tuesday, November 08, 2005 2:29 PM
> To: Scott Godin
> Cc: Scott Lawrence; reSIProcate List
> Subject: Re: [reSIProcate] NameAddr::parse() bug?
> 
> Scott (and Scott) -
> 
> There's a bug open against 3261 on the production quoted below.
> It doesn't currently allow
> 
> To:  foo<sip:foo@xxxxxxx>
> 
> (Specifically, the BNF as it exists requires LWS between the last
> token in the display name
>   and the <)
> 
> At the next opportunity for revision, that will change. Resip needs
> to anticipate that
> change and accept a To header as formed above. Could you confirm that
> the fix
> you applied allows this?
> 
> RjS
> 
> On Nov 8, 2005, at 10:06 AM, Scott Godin wrote:
> 
> > OK - I've committed a solution that works exactly as it does today,
> > except that the trailing whitespace is not included in the display
> > name.
> > This seems to make the most sense.
> >
> > Scott Godin
> >
> >> -----Original Message-----
> >> From: Scott Lawrence [mailto:slawrence@xxxxxxxxxxx]
> >> Sent: Tuesday, November 08, 2005 12:27 PM
> >> To: Scott Godin
> >> Cc: Francesco Fondelli; reSIProcate List
> >> Subject: RE: [reSIProcate] NameAddr::parse() bug?
> >>
> >> On Tue, 2005-11-08 at 11:38 -0500, Scott Godin wrote:
> >>> I don't mind making this change to resip, if everyone agrees.  : )
> >>>
> >>> Should we allow spaces in the unquoted display name - or just stop
> >>> parsing at either LWS or < - as the RFC suggests?
> >>
> >> Spaces are allowed (the '*' means zero-or-more), so if there are no
> >> double quotes you need to stop at the '<', and if there are double
> >> quotes then non-token characters are allowed.
> >>
> >> There are regular expressions that I think are correct in
> >> http://scm.sipfoundry.org/rep/sipX/main/sipXtackLib/src/net/Url.cpp
> >>
> >> --
> >> Scott Lawrence  tel:+1-781-938-5306;ext=162 or
> > sip:slawrence@xxxxxxxxxxx
> >>   Consulting Engineer - Pingtel Corp.  http://www.pingtel.com/
> >>   sipXpbx project coordinator - SIPfoundry
> > http://www.sipfoundry.org/sipX
> >>
> >>
> >
> > _______________________________________________
> > resiprocate-devel mailing list
> > resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> > https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel