🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: demon.ip.support.os2
Article #10

Re: 400 server busy breaks NEWNEWS.CMD

#10
From: Brian {Hamilton Kelly}
Date: Tue, 20 Aug 1996 00:00
60 lines
3125 bytes
In article <08191996204822um@snowyowl.co.uk>
           kempson@snowyowl.co.uk "Niel Kempson" writes:

> I've been using Alex Chapman's NEWNEWS Rexx script to fetch news, but a
> recent development, presumably at Demon's end, has caused it to break
> when it gets two consecutive "400 Server Busy" responses.
> 
> A quick Kermit session suggests that Demon's news server now sends
> 
>     400 server busy<CR><LF><NULL>
> 
> (note the trailing NULL).

Hmm!  Sounds like some of the buglets introduced into the new alpha test
version of TIS's Firewall Toolkit.  There they had a number of fixed text
strings, such as:
      char errmsg[] = "server busy\n";
and the code that wrote this out to the relevant socket was something
along the lines of:
      write(outsock,errmsg,sizeof(errmsg));

The reasoning behind using `sizeof(errmsg)' was that it would be computed
at compile time (unlike the alternative of `strlen(errmsg)') but had the
unfortunate side effect of including the trailing '\0' in the character
count!  The fix has been to change all the relevant lines to:
      write(outsock,errmsg,sizeof(errmsg)-1);

I wonder if someone at Demon has been altering the code in Newsborg?  If
so, how did such an error get past change management and code
walk-throughs?  (I'm assuming that Demon embrace the main precept of
maintaining software, which is that "There's no such thing as a small
change".)

> The second time that a 400 response is connected, the return string line
> contains a NULL at the beginning so the test for 400 fails because it's
> now <NULL>400.  The modification above resets the buffer before getting a
> response.

:-(

> It can be fixed by adding one line between lines 262 & 263:
> 
>     line 262:       /* Get response from connect */
>     add this:       buffer = ''
>     line 263:       reply = GetResponse(socket)
> 
> Problem and fix verified on a fresh version of WRPDIS20 downloaded from
> ftp.demon.co.uk:/pub/os2/tcpip.

But should you need to make this fix: after all, isn't the spurious NUL
(ASCII control characters' names are only two or three letters, not four)
unwanted and also likely to confuse other implementations?

(For this reason, I've cross-posted to d.i.developers.)

-- 
Brian {Hamilton Kelly}                                         bhk@dsl.co.uk
                Tony Blair's New Labour: The Windows'95 of Political Parties
             (c/w Plug'n'Pray and a pretence of offering object-orientation)
Technical Details
Message-ID: <840558665snz@dsl.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <08191996204822um@snowyowl.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10bb05,334a480801f3406,start
X-Google-Attributes: gid10bb05,public
X-Google-Thread: 104dc3,72d94d775ed87379
X-Google-Attributes: gid104dc3,public
From: Brian {Hamilton Kelly} <bhk@dsl.co.uk>
Subject: Re: 400 server busy breaks NEWNEWS.CMD
Date: 1996/08/20
Message-ID: <840558665snz@dsl.co.uk>
X-Deja-AN: 175405168
x-nntp-posting-host: dragnhll.demon.co.uk
references: <08191996204822um@snowyowl.co.uk>
x-mail2news-path: dragnhll.demon.co.uk
organization: Dragonhill Systems Ltd
newsgroups: demon.ip.support.os2,demon.ip.developers