🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
3 messages
3 total messages Started by John Savage Wed, 09 Sep 1998 00:00
does "." terminate server articles?
#31270
Author: John Savage
Date: Wed, 09 Sep 1998 00:00
29 lines
1961 bytes
Because of slow/flakey news, I run a shell script in a cron
job to obtain articles in some newsgroups from remote servers.

I have relied on each article being terminated by a lone dot, and
this has, AFAIK, worked infallibly for a few years. Until today.

It had been my assumption that the dot was added by my remote server,
added after the article to indicate end-of-article, but I'm now
thinking that the dot must be an integral part of the original
article--being added by the poster's server. I say this because
I've stumbled upon an article that doesn't end with a single dot; i.e.,
it doesn't end with J.J where J signifies the ctrl-J character, so
my script's [[ "$xline" == . ]] test fails and the script hangs. :(
The article actually ends with J.MJ where M signifies ctrl-M. (This
has nothing to do with MSDOS terminations; and the article content
has no other MSDOS CR-LF line terminations.)

I can repair the script to accommodate articles ending with either
J.J or J.MJ and of course have done so; but because this is such a rare
ocurrence I'm left wondering whether a termination J.MJ even complies
with the NNTP standard?

The article is in aus.gardens, ID: <35F28E57.FC453AC1@mailbox.uq.edu.au>

Is this particular posting violating NNTP *require*ments?
--
John Savage              (responses to newsgroup, please no copy by email)

Re: does "." terminate server articles?
#31268
Author: Greg Berigan
Date: Wed, 09 Sep 1998 00:00
17 lines
1392 bytes
In news.software.readers, rookswood@suburbian.com.au (John Savage) wrote:

> I can repair the script to accommodate articles ending with either
> J.J or J.MJ and of course have done so; but because this is such a rare
> ocurrence I'm left wondering whether a termination J.MJ even complies
> with the NNTP standard?

Invalid or not, the hanging of the script is surely an unwanted effect
and you'll have to account for it to keep the script robust.

-- 
         ,=<#)-=#  <http://incolor.inetnebr.com/wotw/> (The War of the Worlds)
    ,_--//--_,
 _-~_-(####)-_~-_  If you feel that William Schlake is trolling ciwa.*,
(#>_--'~--~`--_<#) forward the offending postings to abuse@enteract.com.

Re: does "." terminate server articles?
#31273
Author: Fluffy
Date: Wed, 09 Sep 1998 00:00
26 lines
1962 bytes
Meow meow John Savage meow meow meow rookswood@suburbian.com.au meow Kitty?

> I've stumbled upon an article that doesn't end with a single dot; i.e.,
> it doesn't end with J.J where J signifies the ctrl-J character, so
> my script's [[ "$xline" == . ]] test fails and the script hangs. :(

Yes, the dot is added by the server, and yes, you were loking for the
wrong stuff.

The actual terminator is 'CRLF.CRLF' (CRLF is ^M^J) although if you are
grabbing news through a telnet session, it will usually be converted
for you to just 'LF.LF'.  A lot of things, including options
negotiation, can cause the variance you saw.

The answer on how to fix it is to use a "real" programming language to
open a socket and interpret the characters correctly (telnet can get
mightily confused by some of the things that may appear in news
articles), or use one of the already-written packages like newsx or
suck for this purpose.

If you do decide to roll your own replacement in C or perl or whatever,
read through RFC 977 instead of relying on what you think you see
coming down the pipe.  Sometimes, telnet "lies."


Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads