Article View: news.software.nntp
Article #90008Re: Proposal specifications for MAXARTNUM
From: Julien ÉLIE
Date: Thu, 05 Jan 2023 19:02
Date: Thu, 05 Jan 2023 19:02
128 lines
6315 bytes
6315 bytes
Hi Michael,
>> If we're going to have only a very few, if any, more general "ENABLE"
>> commands, is it worth the complexification of defining its parsing
>> instead of just having top-level commands?
>>
>> ENABLE MAXARTNUM=18446744073709551615 UTF8=ACCEPT NULCHARS=ACCEPT
>> MAXRESPLINES=UNLIMITED
>
> There are potential problems if not all of the features are supported
> by the server. The command likely will be rejected with an error code,
> no feature will be enabled and the client doesn't know which subcommand
> was responsible for the problem.
The ENABLE command in IMAP does:
- If the argument is not an extension known to the server, the server
MUST ignore the argument.
- If the argument is an extension known to the server, and it is not
specifically permitted to be enabled using ENABLE, the server MUST
ignore the argument. (Note that knowing about an extension doesn't
necessarily imply supporting that extension.)
- If the argument is an extension that is supported by the server and
that needs to be enabled, the server MUST enable the extension for
the duration of the connection. At present, this applies only to
CONDSTORE ([RFC4551]). Note that once an extension is enabled,
there is no way to disable it.
The ENABLE command can be issued multiple times in a session. It is
additive; i.e., "ENABLE a b", followed by "ENABLE c" is the same as a
single command "ENABLE a b c".
The server MUST NOT change the CAPABILITY list as a result of
executing ENABLE; i.e., a CAPABILITY command issued right after an
ENABLE command MUST list the same capabilities as a CAPABILITY
command issued before the ENABLE command.
For the last point about going on advertising the capability, I am
unsure we should do the same for NNTP, if we use ENABLE. Once the
maximum article number is negotiated, it cannot be changed a second
time, so there's no need in advertising the capability.
> The client has to parse the response
> for information or test all features individually.
> In theory this should not happen, if the client has parsed CAPABILITIES
> carefully, but in real world there may be bugs somewhere.
I agree that parsing ENABLE commands and results without error will be
challenging...
It is far more work than unique commands, one per feature.
Capability list:
[S] ENABLE MAXARTNUM=18446744073709551615 UTF8=NEWSGROUPS,HEADERS
NULCHARS MAXRESPLINES=4096
(or a variant on several lines with individual MAXARTNUM, UTF8 and
MAXRESPLINES capabilities - not needed for NULCHARS)
Command:
[C] ENABLE MAXARTNUM=9223372036854775807 UTF8=NEWSGROUPS MAXRESPLINES=2048
[S] 206 UTF8=NEWSGROUPS MAXARTNUM=9223372036854775807 MAXRESPLINES=2048
Responding what has been enabled, without trailing comment.
We may have instead of a 501 syntax error, not giving useful information:
[C] ENABLE MAXARTNUM=badnumber UTF8=NONE MAXRESPLINES=2048
[S] 506 MAXARTNUM UTF8
(new error code to indicate syntax error in recognized commands, listed
after 506, and MAXRESPLINES is not enabled)
Or we can just use 501 without that complexity.
A bit of work...
> I would prefer simplicity, this means only one feature per command.
> But maybe the toplevel command "ENABLE", to enable/negotiate features,
> is useful to share the same return codes for all features.
Defining shared return codes, and enabling all features in only 1
command, may be the only advantages for ENABLE.
I don't know if that's worth the extra work in complexity of
coding/debugging/getting it right.
Notably if we end up only having MAXARTNUM as a feature to enable...
> C ENABLE UTF-8=ACCEPT
> S 500
Might be 503 (feature not supported) in case the extension is unknown to
the server. (500 is for the base command.)
> This has to be done only once per session and the additional roundtrip
> times should be acceptable if the number of features is small.
We already have many roundtrips in sessions like this one, where the
client sends CAPABILITIES several times:
CAPABILITIES (gosh, MODE-READER is advertised)
MODE READER
CAPABILITIES (gosh, there is no argument to AUTHINFO)
STARTTLS
CAPABILITIES (yes, I can now authenticate)
AUTHINFO USER
AUTHINFO PASS
CAPABILITIES (I now have more capabilities available)
COMPRESS DEFLATE
ENABLE MAXARTNUM=18446744073709551615
And now after 10 commands (sic), I can send LIST ACTIVE & co.
Using implicit TLS on port 563, which is the most wide-spread situation,
we have 4 less commands.
Seems reasonable after all to have separate commands (MAXARTNUM, and
other possible future extensions) instead of ENABLE...
--
Julien ÉLIE
« On appelle ça une insula. C'est une maison où les gens habitent les
uns au-dessus des autres… » (Astérix)
Technical Details
Message-ID:
<tp76sd$90fs$2@news.trigofacile.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mailReferences:
<tnqm14$35bas$1@news.trigofacile.com> <tou5si$1na9g$1@dont-email.me> <tp53et$7clk$1@news.trigofacile.com> <AABjtplGZckAAAqY.A3.flnews@WStation7.micha.freeshell.org>Show Full Headers
Complete Article Headers
Message-ID: <tp76sd$90fs$2@news.trigofacile.com> Subject: Re: Proposal specifications for MAXARTNUM Date: Thu, 5 Jan 2023 20:02:37 +0100 From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> References: <tnqm14$35bas$1@news.trigofacile.com> <tou5si$1na9g$1@dont-email.me> <tp53et$7clk$1@news.trigofacile.com> <AABjtplGZckAAAqY.A3.flnews@WStation7.micha.freeshell.org> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail Newsgroups: news.software.nntp Organization: Groupes francophones par TrigoFACILE Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Thu, 5 Jan 2023 19:02:37 -0000 (UTC) Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="176-143-2-105.abo.bbox.fr:176.143.2.105"; logging-data="295420"; mail-complaints-to="abuse@trigofacile.com" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Cancel-Lock: sha1:5vWjKjVcfnW2havPKjDNn8riso8= sha256:HmYRLE9BzM0uHIxPS3YmcEtVJvZCy0LZzE0lcSi00u4= sha1:FDGxdlM/MicPs9DGxCIvAVze1TQ= sha256:vLB7eAkg174O1cVqaAAW+5972yLvILfMRgKjAb2BQa0= In-Reply-To: <AABjtplGZckAAAqY.A3.flnews@WStation7.micha.freeshell.org>