Subject: [Simple] MSRP-07 ABNF issues

From: Pekka Pessi <[email-masked]>
Date: Mon, 09 Aug 2004 16:48:42 +0300

Hello all,

There are a few issues related to ABNF and the text in MSRP-07.
Most of them are just nits, but..

1) The protocol token and method name defintions must have explicit
base character 'x' after the '%' sign. I think this is correct
form:

  pMSRP = %x4D.53.52.50 ; MSRP in caps

2) There is no definition for UPALPHA or DIGIT or HT or SP or... I
presume:

  CRLF = %x0D.0A
  HT = %x09
  SP = %x20
  UPALPHA = %x41-5A 
  LOWALPHA = %x61-7A
  DIGIT = %x30-39
  ALPHANUM = LOWALPHA / UPALPHA / DIGIT

3) The 'header' can expand to Mime-Header. Mime-Header is not
defined anywhere. Left-over from earlier days?

4) The text discusses about "none" as value to Report-Failure.
However,  ABNF values are "yes", "no" or "partial".

5) "Token" has no closing parenthesis in its expansion. 

Token definition is again different from everything else. For
example, RFC 2045 and sdp-new define "token" like this:

  token = 1*(%x21 / %xx23-27 / %x2A-2B / %x2D-2E / %x30-39 / %x41-5A / %x5E-7E)

6) Speaking of token, I don't think it is a good idea to have
"token" in the MSRP URL. Using "%", for instance, is very very
confusing. Instead, transport could be defined separately as a
subset of token and unreserved:

  transport = "tcp" / ttoken
  ttoken = 1*( ALPHANUM / "-" / "_" / "." / "!" / "~" / "*" / "'" )

7) Only the first two examples are valid according to the ABNF.
There are extra quotation marks or whitespace is missing.
Curiously, the examples have data with a CRLF in the beginning
(two empty lines after headers) but not at the end (no empty line
before end-line). Leftover from message/cpim?

--Pekka

_______________________________________________
Simple mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/simple

---

From: Ben Campbell <[email-masked]>
Date: Fri, 13 Aug 2004 17:24:35 -0500

Hi,

I think I have fixed 1-6. Can you point out the specific occurrences of 
the problem for 7?

Thanks!

---

From: Rohan Mahy <[email-masked]>
Date: Fri, 13 Aug 2004 18:47:32 -0700

>   pMSRP = %x4D.53.52.50 ; MSRP in caps

good catch

>   ALPHANUM = LOWALPHA / UPALPHA / DIGIT

These productions are defined in the RFC that defines ABNF.  We could 
add them for clarity, but I think They are pretty well understood.  I 
could go either way.

> defined anywhere. Left-over from earlier days?

oops

> However,  ABNF values are "yes", "no" or "partial".

will make these consistent (none/no)

> before end-line). Leftover from message/cpim?

good reading.

thx,
-r

---

From: Paul Kyzivat <[email-masked]>
Date: Sat, 14 Aug 2004 12:44:42 -0400

> add them for clarity, but I think They are pretty well understood.  I 

I have looked at that, and while it isn't clear to me, I think the 
definitions there are simply examples, as well as being used in the 
syntax of ABNF itself. So I think such things should be copied into 
other syntaxes that need them.

	Paul

---

From: Pekka Pessi <[email-masked]>
Date: Tue, 17 Aug 2004 16:46:46 +0300

Yet another nit in ABNF:

8) Status things are not defined. I think they are as follows:

     namespace = 3DIGIT
     short-status = status-code
     text-reason = phrase

A bit bigger issue:

9) To-Path and From-Path seem to be pretty mandatory in requests
and responses. Should we update the language in section 6.1 and
the ABNF so that they are normatively required, for example:

   headers = To-Path CRLF From-Path CRLF 1*( header CRLF )

   header = ( Message-ID
    / Report-Success
    / Report-Failure
    / Byte-Range
    / Status
    / ext-header )

Another nit:

10) UTF-8 definition is not correct (it looks like it has been
    lifted from RFC 3261). My proposal which weeds out fishy
    things from ASCII range masquerading as UTF-8:

   utf8text = *(HT / %x20-7E / UTF8-NONASCII)

   UTF8-NONASCII = %xC2-DF 1UTF8-CONT
                 / %xE0-EF 2UTF8-CONT
                 / %xF0-F7 3UTF8-CONT

   UTF8-CONT     = %x80-BF

RFC 3629 definition (which weeds out even more fishy things):

   UTF8-octets = *( UTF8-char )
   UTF8-char   = UTF8-1 / UTF8-2 / UTF8-3 / UTF8-4
   UTF8-1      = %x00-7F
   UTF8-2      = %xC2-DF UTF8-tail
   UTF8-3      = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) /
                 %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail )
   UTF8-4      = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) /
                 %xF4 %x80-8F 2( UTF8-tail )
   UTF8-tail   = %x80-BF

A problem for 3GPP:

11) The RFC 2396 explicitly disallows IPv6 addresses in hostport.
    Should we use hostport from RFC 3261 instead?

hostport       =  host [ ":" port ]
host           =  hostname / IPv4address / IPv6reference
hostname       =  *( domainlabel "." ) toplabel [ "." ]
domainlabel    =  alphanum / alphanum *( alphanum / "-" ) alphanum
toplabel       =  ALPHA / ALPHA *( alphanum / "-" ) alphanum
IPv4address    =  1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT
IPv6reference  =  "[" IPv6address "]"
IPv6address    =  hexpart [ ":" IPv4address ]
hexpart        =  hexseq / hexseq "::" [ hexseq ] / "::" [ hexseq ]
hexseq         =  hex4 *( ":" hex4)
hex4           =  1*4HEXDIG
port           =  1*DIGIT

HEXDIG         =  %x30-39 / %x41-46 / %x61-66

--Pekka

---

From: Pekka Pessi <[email-masked]>
Date: Tue, 17 Aug 2004 16:48:53 +0300

>Can you point out the specific occurrences of the problem for 7?

OK. Here we go for the examples (only including versions where I
have fixed errors):

Page 7 (extra CRLF in the beginning of message):

   MSRP a786hjs2 SEND
   To-Path: msrp://biloxi.example.com:12763/kjhd37s2s2;tcp
   From-Path: msrp://atlanta.example.com:7654/jshA7we;tcp
   Message-ID: 87652
   Content-Type: text/plain

   Hey Bob, are you there?
   -------a786hjs2$

Page 9 (extra quotes, extra CRLF in the beginning of message):

    MSRP dkei38sd SEND
    To-Path: msrp://biloxi.example.com:12763/kjhd37s2s2;tcp
    From-Path: msrp://atlanta.example.com:7654/jshA7we;tcp
    Message-ID: 456
    Byte-Range: 1-4/8
    Content-Type: text/plain

    abcd
    -------dkei38sd+

    MSRP dkei38ia SEND
    To-Path: msrp://biloxi.example.com:12763/kjhd37s2s2;tcp
    From-Path: msrp://atlanta.example.com:7654/jshA7we;tcp
    Message-ID: 456
    Byte-Range: 5-8/8
    Content-Type: text/plain

    EFGH
    -------dkei38ia$

Page 35 (whitespace, empty line missing): 

        MSRP d93kswow SEND
        To-Path: msrp://bob.example.com:8888/9di4ea;tcp
        From-Path: msrp://alicepc.example.com:7777/iau39;tcp
        Message-ID: 12339sdqwer
        Content-Type: text/plain

        Hi, I'm Alice!
        -------d93kswow$

        MSRP d93kswow 200 OK
        To-Path: msrp://bob.example.com:8888/9di4ea;tcp
        From-Path: msrp://alicepc.example.com:7777/iau39;tcp
        -------d93kswow$

        MSRP dkei38sd SEND
        To-Path: msrp://alice.example.com:7777/iau39;tcp
        From-Path: msrp://bob.example.com:8888/9di4ea;tcp
        Message-ID: 456
        Content-Type: text/plain

        Hi, Alice! I'm Bob!
        -------dkei38sd$

        MSRP dkei38sd 200 OK
        To-Path: msrp://alice.example.com:7777/iau39;tcp
        From-Path: msrp://bob.example.com:8888/9di4ea;tcp
        -------dkei38sd$

Page 36 (whitespace, empty line missing, now torturing with case):

   Sysadmin->Alice (MSRP):

   MSRP vZohU+P4 SEND
   to-path: MSRP://ALICEPC.EXAMPLE.COM:8888/5qWX;TCP
   from-path: MSRP://EXAMPLE.COM:7777/Cwix;TCP
   message-id: Z0lHBnF1wDett0nsMfLIvQ
   report-failure: NO
   report-success: NO
   content-type: Text/Plain

   The system is going down in 5 minutes
   -------vZohU+P4$

Page 37 (whitespace, SEND instead of REPORT):

   Alice->Bob (MSRP):

   MSRP H21vs6Wy SEND
   To-Path: msrp://bob.example.com:8888/cvDWt3ui;tcp
   From-Path: msrp://alicepc.example.com:7777/fVTFIykn;tcp
   Message-ID: 0zt9FDMj+KTE8jGj
   Report-Success: yes
   Content-Type: text/html

   <html><body>
   <p>Here is that important link...
   <a href="www.example.com/foobar">foobar</a>
   </p>
   </body></html>

   -------H21vs6Wy$

   Bob->Alice (MSRP):

   MSRP H21vs6Wy 200 OK
   To-Path: msrp://alicepc.example.com:7777/fVTFIykn;tcp
   From-Path: msrp://bob.example.com:8888/cvDWt3ui;tcp
   -------H21vs6Wy$

   Bob->Alice (MSRP):

   MSRP Dzu2ddLJ REPORT
   To-Path: msrp://alicepc.example.com:7777/fVTFIykn;tcp
   From-Path: msrp://bob.example.com:8888/cvDWt3ui;tcp
   Message-ID: 0zt9FDMj+KTE8jGj
   Status: 000 200 OK
   -------Dzu2ddLJ$

--Pekka