🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #44439

Re: Batched ARTICLE commands

#44439
From: Curt Welch
Date: Sat, 26 Feb 2000 00:00
58 lines
3537 bytes
Jeremy <bofh@netscum.dk> wrote:
> Curt Welch <curt@kcwc.com> wrote:
>
> > And example of how this might cause probelms...
> >
> > A client author decides to do a "MODE READER" followed by a "DATE"
> > command on start up.  He sends both before reading the results.
>
> I think that's a broken client.  MODE READER is a command which can fail,
> and therefore, if a client proceeds onward without seeing whether it has
> failed, it's broken.  You shouldn't assume that a command has succeeded
> when it is not guaranteed to do so.

MODE READER is a non standard command which can fail simply because the
server doesn't implement it.  Clients should never assume anything
about the return codes from it.

The reason clients must wait for the return code is not to see what
the server said, but simply because INN has a bug where it might
eat any pipelined characters there.

> > But POST and IHAVE can't be because of logical protocol reasons ---
> > i.e. the client has to wait for the response before it can know what
> > will be acceptable next in the data stream.  The RFC clearly implies
> > that already.  Nothing else really needs to be said there.  What it
> > doesn't imply (or even hint at) is that that pipelining might be a
> > problem at the MODE READER command.
>
> It's the same situation.  The client has to wait for the response to the
> MODE READER command before it can know what will be acceptable next in
> the data stream.

No not at all.  It must wait at MODE READER if it wants to work correctly
with buggy inn servers.  It must wait for the return to POST and IHAVE
only because it's impractical not to.

By my reading of the RFC, it's pefectly valid to send the following
byte stream to any NNTP server:

  IHAVE <crap@my.isp> CR LF . CR LF POST CR LF . CR LF

and no matter how the server responds to the IHAVE or POST, it should be
in a well defined state after that stream -- i.e. waiting for a new
command.  So there is no real requirement that the client not pipeline
data after any COMMAND.

A buggy server however -- one that drops characters in the stream at
different points, may not be in the correct state at this point.  For
example, it may have received the IHAVE, and then tossed all the other
other characters.  So it, at this point, would be waiting for you
to send it an article.  But that is clearly a violation of the RFC in
my eyes (even if others don't read it that way :)).

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

Technical Details
Message-ID: <20000226162848.241$4u@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> <20000225180328.114$Ys@newsreader.com> <87zosog8kl.fsf@erlenstar.demon.co.uk> <20000225234216.661$0Y@newsreader.com> <951591707.545691@news.netscum.dk>

Show Full Headers
Complete Article Headers
Message-ID: <20000226162848.241$4u@newsreader.com>
Subject: Re: Batched ARTICLE commands
Date: Sat, 26 Feb 2000 00:00:00 +0000
From: curt@kcwc.com (Curt Welch)
References: <220220000104304154%planb@newsreaders.com> <20000225180328.114$Ys@newsreader.com> <87zosog8kl.fsf@erlenstar.demon.co.uk> <20000225234216.661$0Y@newsreader.com> <951591707.545691@news.netscum.dk>
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: 590385257
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