[ietf-nntp] RE: How to organize the base NNTP draft
Clive D.W. Feather
clive at demon.net
Fri Jun 11 02:00:13 PDT 2004
Ken Murchison said:
> Here's what I currently have base on 23pre3. Comments?
Okay. First point is that your comments have pointed out some shortcomings,
and I've made further changes that you'll need to react to. Sorry - this
isn't in any way your fault.
23pre4 merges 9.3 and 9.4 back together again, with a new arrangement of:
9. Augmented BNF Syntax for NNTP
9.1 Commands
9.2 Command continuation
9.3 Responses
9.3.1 Generic responses
9.3.2 Initial response line contents
9.3.3 Multi-line response contents
9.4 LIST EXTENSIONS responses
9.5 Articles
9.6 General non-terminals
and corresponding minor changes to the non-terminals involved.
> 3. Augmented BNF Syntax for the AUTHINFO Extension
>
> This section describes the syntax of the AUTHINFO extension. It
> extends the syntax in [NNTP], and non-terminals not defined in this
> document are defined there.
>
> 3.1. Commands
>
> This syntax extends the non-terminal "command", which represents an
> NNTP command.
>
> command /= authinfo-user-command /
> authinfo-pass-command /
> authinfo-sasl-command
>
> authinfo-user-command = "AUTHINFO" WS "USER" WS username
> authinfo-pass-command = "AUTHINFO" WS "PASS" WS password
> authinfo-sasl-command = "AUTHINFO" WS "SASL" WS sasl-mechanism-name
> [WS sasl-initial-response]
>
> username = 1*P-CHAR
> password = 1*P-CHAR
> sasl-initial-response = ("=" / base64)
Fine. Except can I suggest:
sasl-initial-response = base64-opt
and then in the generic section:
base64-opt = "=" / base64
(and if you reject that, still note that those parentheses aren't needed).
> 3.2. Command Continuation
>
> This syntax extends the non-terminal "command-continuation", which
> represents the further material sent by the client in the case of
> multi-stage commands.
>
> command-continuation /= authinfo-sasl-continuation
> authinfo-sasl-continuation = *([sasl-client-response] CRLF)
> ; client waits for a "383" response from the server before
> ; sending each line
> sasl-client-response = ("*" / base64)
I would take the view that each command-continuation is one step in the
back-and-fro discussion. So I would have:
command-continuation /= authinfo-sasl-continuation
authinfo-sasl-continuation = ["*" / base64-opt] CRLF
I don't think the extra indirection is of use here. I thought that "=" was
valid here, so we need base64-opt rather than just base64.
> 3.3. Responses
>
> This syntax extends the non-terminal "response", which represents
> what is sent from the server to the client in response to a command
> or command-continuation.
>
> argument /= sasl-server-challenge
> sasl-server-challenge = ("=" / base64)
This indicated my mistake in the previous text. Let me first quote my new
9.3.2, and then what I suggest you need:
9.3.2 Initial response line contents
This syntax defines the specific initial response lines for the
various commands and extensions in this specification. Only those
response codes with arguments are listed.
simple-response-content /= response-111-content
response-211-content
response-22x-content
response-401-content
response-111-content = "111" SP date4y time
response-211-content = "211" 3(SP article-number) SP newsgroup-name
response-22x-content = ("220" / "221" / "222" / "223")
SP article-number SP message-id
response-401-content = "401" SP extension-label
So what you need is:
simple-response-content /= response-x83-content
response-x83-content = ("283" / "383") SP sasl-server-challenge
sasl-server-challenge = base64-opt
(Have I remembered the codes correctly? If not, tune as appropriate.)
> 3.4. LIST EXTENSIONS responses
>
> This syntax defines the specific LIST EXTENSIONS responses for the
> AUTHINFO extension.
>
> extension-descriptor /= authinfo-extension
> authinfo-extension = %x41.55.54.48.49.4E.46.4F ; "AUTHINFO"
> *(SPA authinfo-extension-arg)
> authinfo-extension-arg = "USER" /
> ("SASL:" sasl-mechanism-name *("," sasl-mechanism-name))
Except that you don't need the parentheses on the last line, that looks
fine to me.
> 3.5. General non-terminals
>
> sasl-mechanism-mame = 1*20sasl-mech-char
> sasl-mech-char = %x41-5A / DIGIT / "-" / "_"
> ; mechanism names restricted to uppercase letters,
> ; digits, "-" and "_"
I take it something else sets that restriction.
> base64 = *(4base64-char) [base64-terminal]
> base64-terminal = (2base64-char "==") / (3base64-char "=")
Those parentheses aren't needed (the ones in base64 are). Or just:
base64 = *(4base64-char) [2base64-char "==" / 3base64-char "="]
> base64-char = ALPHA / DIGIT / "+" / "/"
> ; case sensitive
We don't have ALPHA anywhere in the syntax. I'd suggest:
base64-char = UPPER / LOWER / DIGIT / "+" / "/"
LOWER = %x61-7A
which has the added advantage of making the case-sensitivity clearer.
--
Clive D.W. Feather | Work: <clive at demon.net> | Tel: +44 20 8495 6138
Internet Expert | Home: <clive at davros.org> | Fax: +44 870 051 9937
Demon Internet | WWW: http://www.davros.org | Mobile: +44 7973 377646
Thus plc | |
More information about the ietf-nntp
mailing list