2 feb 2009 kl. 22.56 skrev Iñaki Baz Castillo:

> Hi,RFC 3261 BNF section defines Request-URI as follows:
>
>       Request-URI    =  SIP-URI / SIPS-URI / absoluteURI
>
> While it's obvious doing a complete parsing of SIP and SIPS URI, I  
> wonder how
> useful is parsing sctrictly an absolute URI. Note that absoluteURI  
> contains a
> very complex grammar:
>
>       absoluteURI    =  scheme ":" ( hier-part / opaque-part )
>       hier-part      =  ( net-path / abs-path ) [ "?" query ]
>       net-path       =  "//" authority [ abs-path ]
>       abs-path       =  "/" path-segments
>       opaque-part    =  uric-no-slash *uric
>       uric           =  reserved / unreserved / escaped
>       uric-no-slash  =  unreserved / escaped / ";" / "?" / ":" / "@"
>                                       / "&" / "=" / "+" / "$" / ","
>       path-segments  =  segment *( "/" segment )
>       segment        =  *pchar *( ";" param )
>       param          =  *pchar
>       pchar          =  unreserved / escaped /
>                                       ":" / "@" / "&" / "=" / "+" / "$" / ","
>       scheme         =  ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
>       authority      =  srvr / reg-name
>       srvr           =  [ [ userinfo "@" ] hostport ]
>       reg-name       =  1*( unreserved / escaped / "$" / ","
>                                       / ";" / ":" / "@" / "&" / "=" / "+" )
>       query          =  *uric
>
>
> IMHO for a SIP server parsing an absoluteURI is not useful at all (I  
> don't
> consider, of course, the case of a server implementing SIP and HTTP  
> and/or
> other protocols).
>
> So I wonder if would be possible to relax the absoluteURI grammar  
> making
> it "faster" to parse, something like (not pure BNF):
>
>       absoluteURI    =  scheme ":" 1*( any_char - ( "<" | ">" ) )
>       scheme         =  ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
>
> In this way, the SIP parser would detect the absoluteURI scheme and  
> pass it to
> a higher application logic handling protocols more than SIP and SIPS.
>
> Do you consider it correct? any dissadvantage? (Please, consider  
> common cases
> implementing a normal SIP server).
>
> Thanks a lot.
>
>
> PD: I would also consider "tel" URI:
>
>       Request-URI    =  SIP-URI / SIPS-URI / TEL-URI / absoluteURI
>

I would add an IM: uri that needs to be resolved one more layer before  
sending it to a higher level...

/O
_______________________________________________
Sip-implementors mailing list
[email protected]
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors

Reply via email to