Hi, as per BNF grammar in RFC 3261, the following URI (absolute URI as
it's not sip/sips/tel) is not allowed:

  mailto:alice@[3ffe:1900:4545:3:200:f8ff:fe21:67cf]


Note AbsoluteURI 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
---------------------------------


So if we analize mailto:alice@[3ffe:1900:4545:3:200:f8ff:fe21:67cf]:

- It's not "hier-part" as doesn't start with "/" or "//". So it's "opaque-part".

- "opaque-part" is "uric-no-slash *uric" which, at the end, just allow:

      reserved    =  ";" / "/" / "?" / ":" / "@" / "&" / "=" / "+" / "$" / ","
      unreserved  =  alphanum / mark
      mark        =  "-" / "_" / "." / "!" / "~" / "*" / "'" / "(" / ")"
      escaped     =  "%" HEXDIG HEXDIG

  and also:

      ";" / "?" / ":" / "@" / "&" / "=" / "+" / "$" / ","

- Obviously "[" and "]" are not allowed! so IPv6 references are not allowed!



So I come first to another question: is it valid this URI? (replace
"mailto" with any custom scheme if you want):

  mailto:alice@[3ffe:1900:4545:3:200:f8ff:fe21:67cf]

IMHO it is valid, but the above grammar does NOT allow it. Am I wrong?
or is it a bug in SIP BNF?

-- 
Iñaki Baz Castillo
<[email protected]>

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

Reply via email to