Hi, there are things that I can't understand. For example the syntax of Via
header:
Via = ( "Via" / "v" ) HCOLON via-parm *(COMMA via-parm)
; example:
; Via: SIP/2.0/TCP client.atlanta.example.com:5060
; ;branch=z9hG4bK74b76
; ;received=192.0.2.101
via-parm = sent-protocol LWS sent-by *( SEMI via-params )
sent-protocol = protocol-name SLASH protocol-version SLASH transport
SLASH = SWS "/" SWS
SWS = [LWS]
LWS = [*WSP CRLF] 1*WSP
WSP = SP / HTAB
Why the f*** it it so permissive? it makes parsing more inneficient than it
could be. For example, take a look to this perfectly VALID Via header:
-----------------------------------------------------------------
Via: \t SIP \t\t
/ 2.0
/ UDP
192.168.1.58
: \t
6800
;rport; \t branch =
z9hG4bKlcjszvyq ;ssd
-----------------------------------------------------------------
One problem is the abnf of SLASH:
SLASH = SWS "/" SWS
Why not use just "/" ??? then parsing "sent-protocol" would be very easy:
sent-protocol = protocol-name "/" protocol-version "/" transport
Yes, we have still line-folding but why allow \r\n \t \s
between "protocol_name" and "/", why?
"sent-protocol" will never fill 78 columns so the excuse of line-folding and
clients not accepting lines longer than 78 chars is not valid.
Am I the only who thinks that SIP could be really much easier than it's now
just by doing it less permissive?
Thanks for any comment.
--
Iñaki Baz Castillo
[EMAIL PROTECTED]
_______________________________________________
Sip-implementors mailing list
[email protected]
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors