🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #44423

Re: Batched ARTICLE commands

#44423
From: Curt Welch
Date: Fri, 25 Feb 2000 00:00
89 lines
5432 bytes
Andrew Gierth <andrew@erlenstar.demon.co.uk> wrote:
> >>>>> "Curt" == Curt Welch <curt@kcwc.com> writes:
>
>  Curt> Not "allowing" batched commands (as are talked about in this
>  Curt> thread) means the server is broken.  The RFCs are all very
>  Curt> clear on the format of incomming commands in the TCP stream. If
>  Curt> any NNTP server receives the characters: "ARTICLE 1\r\nARTICLE
>  Curt> 2\r\n" from the TCP stream, and decides to toss out the second
>  Curt> command, then it is very broken.  Nowhere in the spec does it
>  Curt> say it's OK to throw away data from the TCP stream.
>
> You are over-interpreting the RFC.

I don't think so.  I'd accept the argument that the RFC doesn't match
current practice regarding this issue, but I won't accept the argument
that I'm reading something into the spec which isn't there.

The truth is that the NNTP RFCs (at least all I've read), don't address the
issue at all.  But it's very clear that if the client sends a valid
command, and the server decides to ignore it (or decides to ignore just
some of the bytes) -- then the server is not following the RFC. There's
just no other way to read the RFC.

> A case for comparison: the SMTP RFC documents a protocol with a
> somewhat similar form of commands & responses; but it turns out to be
> necessary for client implementations _not_ to pipeline commands by
> default (with ESMTP, the server can advertise that pipelining is OK).

If the NNTP RFC called out cases where it was not OK for clients to
pipeline commands (and the only real reason for that I see -- is to
allow for servers to drop characters at that point), then a server which
dropped charcters at that point would be following the RFC.  But none of
the RFCs I've seen allow for that.  So, I think it's fair to see servers
which dropped characters anywhere in the stream are broken as per the
current RFCs.

> This has been discussed (somewhat briefly) on the NNTP list, and the
> conclusion was that pipelining was OK with widely-deployed server
> implementations, with the exception of the MODE READER command (which
> in the rare cases when it is actually needed and is not a no-op,
> cannot be pipelined).  I would be inclined to avoid trying it for
> AUTHINFO commands too.

Yeah, I wasn't even thinking about the cases where the server is going
to try and hand-off the connection to another process.  In that case,
it's hard to "get it right". But in my mind, INN has always been broken
in that respect.

I think it would be wise to add that to the RFC -- i.e. that pipelining
of commands (by _clients_) should not be allowed after the mode reader
command.

It strikes me as a bit odd to do it for AUTHINFO, but I guess you are
thinking that some servers might fork off different processes depending
on whether the authenticated user had feed vs read permisssion?

>  Curt> There is no reason that I can think of that someone would
>  Curt> intentionally flush commands in an NNTP stream.  To flush
>  Curt> commands correctly would be very hard.  I'm sure the servers
>  Curt> that don't allow streaming comands are just poorly written
>  Curt> pieces of crap that not only dis-allow streaming commands,
>
> This is not necessarily the case.
>
> The usual cause for streaming failing to work (as often found in
> mail, and as in the case of MODE READER) is when the connection
> is being handed off to a sub-process after commands have been
> read.

Yeah, I understand that.  I just wasn't thinking about it when I wrote
my other message.

>  Curt> By saying "they allow streaming commands", it makes it sound
>  Curt> like the programmer had to add extra code to support the
>  Curt> feature (one that perhaps you think isn't even required).  But
>  Curt> the truth is, if he doesn't add that code, he's written a
>  Curt> broken server that doesn't follow the NNTP protocol.
>
> The way that sendmail, for example, doesn't follow the SMTP protocol?

I don't understand the issue with SMTP so I can't really comment on that.
But if sendmail flushes data from the stream at some point, and the RFC
doesn't say it's ok, then sure, sendmail doesn't follow the SMTP protocol.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/

Technical Details
Message-ID: <20000225180328.114$Ys@newsreader.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <220220000104304154%planb@newsreaders.com> <240220000054115493%planb@newsreaders.com> <20000225004139.313$nK@newsreader.com> <250220001158002643%planb@newsreaders.com> <20000225125610.123$Ow@newsreader.com> <yl6itzdjb0r.fsf@independence.ecn.ou.edu> <20000225162640.211$2M@newsreader.com> <87n1opgdej.fsf@erlenstar.demon.co.uk>

Show Full Headers
Complete Article Headers
Message-ID: <20000225180328.114$Ys@newsreader.com>
Subject: Re: Batched ARTICLE commands
Date: Fri, 25 Feb 2000 00:00:00 +0000
From: curt@kcwc.com (Curt Welch)
References: <220220000104304154%planb@newsreaders.com> <240220000054115493%planb@newsreaders.com> <20000225004139.313$nK@newsreader.com> <250220001158002643%planb@newsreaders.com> <20000225125610.123$Ow@newsreader.com> <yl6itzdjb0r.fsf@independence.ecn.ou.edu> <20000225162640.211$2M@newsreader.com> <87n1opgdej.fsf@erlenstar.demon.co.uk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 590055153
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5 %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-User: Curt@NewsReader.Com
Organization: NewsReader.Com
X-Url: http://CurtWelch.Com/
Newsgroups: news.software.nntp