🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #87506

Re: Draft -03 for COMPRESS

#87506
From: Michael Bäuerle
Date: Thu, 04 Aug 2016 16:20
129 lines
5114 bytes
Julien ÉLIE wrote:
> Michael Bäuerle wrote:
> > 
> > [COMPRESS implementation for INN]
> > Please note me when it's finished. The error handling of flnews for the
> > compression negotiation should be tested.
> 
> Now done.  You can test it if you want.
> Here are examples of handled cases:
> 
> [C] COMPRESS
> [S] 501 Syntax is:  COMPRESS DEFLATE
> 
> [C] COMPRESS ARG ARG
> [S] 501 Syntax is:  COMPRESS DEFLATE
> 
> [C] COMPRESS \x02
> [S] 501 Syntax error in compression algorithm
> 
> [C] COMPRESS NOT.VALID
> [S] 501 Syntax error in compression algorithm
> 
> [C] COMPRESS AAAAAAAAAAAAAAAAAAAAA
> [S] 501 Syntax error in compression algorithm
> 
> [C] COMPRESS UNKNOWN
> [S] 503 Only the DEFLATE compression algorithm is supported
> 
> 
> 
> Do not hesitate to tell me if you notice something wrong.

I have found no problems. Anything worked as expected for INN
and flnews.


Scenario 1 (invalid command):
------------------------------------------------------------------------
[...]
[=>] CAPABILITIES
[<=] 101 Capability list:
[<= Expect multiline data block]
VERSION 2
IMPLEMENTATION INN 2.7.0 (20160802 snapshot)
COMPRESS DEFLATE
[...]
[=>] COMPRESSx DEFLATE
[<=] 500 What?
[Enabling compression failed]
[=>] GROUP trigofacile.test
[...]
------------------------------------------------------------------------

Scenario 2 (unsupported compression algorithm):
------------------------------------------------------------------------
[...]
[=>] CAPABILITIES
[<=] 101 Capability list:
[<= Expect multiline data block]
VERSION 2
IMPLEMENTATION INN 2.7.0 (20160802 snapshot)
COMPRESS DEFLATE
[...]
[=>] COMPRESS XDEFLATE
[<=] 503 Only the DEFLATE compression algorithm is supported
[Enabling compression failed]
[=>] GROUP trigofacile.test
[...]
------------------------------------------------------------------------

Scenario 3 (invalid command syntax):
------------------------------------------------------------------------
[...]
[=>] CAPABILITIES
[<=] 101 Capability list:
[<= Expect multiline data block]
VERSION 2
IMPLEMENTATION INN 2.7.0 (20160802 snapshot)
COMPRESS DEFLATE
[...]
[=>] COMPRESS A DEFLATE
[<=] 501 Syntax is:  COMPRESS DEFLATE
[Enabling compression failed]
[=>] GROUP trigofacile.test
[...]
------------------------------------------------------------------------

Scenario 4 (normal, working behaviour with capability refresh):
------------------------------------------------------------------------
[...]
[=>] CAPABILITIES
[<=] 101 Capability list:
[<= Expect multiline data block]
VERSION 2
IMPLEMENTATION INN 2.7.0 (20160802 snapshot)
COMPRESS DEFLATE
[...]
[=>] COMPRESS DEFLATE
[<=] 206 Compression now active; enjoy the speed!
[=>] CAPABILITIES
[<=] 101 Capability list:
[<= Expect multiline data block]
VERSION 2
IMPLEMENTATION INN 2.7.0 (20160802 snapshot)
HDR
LIST ACTIVE ACTIVE.TIMES COUNTS DISTRIB.PATS DISTRIBUTIONS HEADERS MODERATORS MOTD NEWSGROUPS OVERVIEW.FMT SUBSCRIPTIONS
OVER
POST
READER
SASL GSSAPI OTP PLAIN NTLM LOGIN DIGEST-MD5 CRAM-MD5
XPAT
[=>] GROUP trigofacile.test
[...]
[=>] QUIT
[<=] 205 Bye!
[Compression layer terminated]
[Encryption layer terminated]
[Close connection]
------------------------------------------------------------------------

For the last (working) case, the COMPRESS capability was correctly
removed from the list by INN.

For all the error cases above, the NNTP connection still worked (was
used by flnews without compression transparently).

Looks good.

Technical Details
Message-ID: <AABXo2tbDmoAAAc0.A1.flnews@WStation5.stz-e.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mail
References: <njf91p$b3i$1@news.trigofacile.com> <AABXW+4JgdcAAA2l.A1.flnews@Server4.micha.freeshell.org> <njh71t$gq3$1@news.trigofacile.com> <AABXXSM2rvcAAAt6.A1.flnews@Server4.micha.freeshell.org> <njjo6n$ct3$1@news.trigofacile.com> <njjpno$eit$1@news.trigofacile.com> <AABXXXroib0AAA1G.A1.flnews@Server4.micha.freeshell.org> <njsf8k$663$1@news.trigofacile.com> <AABXYmsFDv0AAAd+.A1.flnews@WStation5.stz-e.de> <njuvm7$v0s$1@news.trigofacile.com> <AABXY9ValdcAAErq.A1.flnews@WStation5.stz-e.de> <nnqqq0$ciu$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <AABXo2tbDmoAAAc0.A1.flnews@WStation5.stz-e.de>
Subject: Re: Draft -03 for COMPRESS
Date: Thu, 4 Aug 2016 18:20:43 +0200
From: Michael Bäuerle <michael.baeuerle@stz-e.de>
References: <njf91p$b3i$1@news.trigofacile.com> <AABXW+4JgdcAAA2l.A1.flnews@Server4.micha.freeshell.org> <njh71t$gq3$1@news.trigofacile.com> <AABXXSM2rvcAAAt6.A1.flnews@Server4.micha.freeshell.org> <njjo6n$ct3$1@news.trigofacile.com> <njjpno$eit$1@news.trigofacile.com> <AABXXXroib0AAA1G.A1.flnews@Server4.micha.freeshell.org> <njsf8k$663$1@news.trigofacile.com> <AABXYmsFDv0AAAd+.A1.flnews@WStation5.stz-e.de> <njuvm7$v0s$1@news.trigofacile.com> <AABXY9ValdcAAErq.A1.flnews@WStation5.stz-e.de> <nnqqq0$ciu$1@news.trigofacile.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.(19219).mbox.7z!not-for-mail
Newsgroups: news.software.nntp
Lines: 127
Reply-To: Michael Bäuerle <michael.baeuerle@gmx.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=fixed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net N7pZgvpYdgC0amJ3TgTekw7Z0c2LgIlA3zWLZEtudhTTkHFTzX
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:q5GowhMjw5NbMv/RHHkNw46kmMM= sha1:qFiJFZCMmuhLXDClKlXdTsFPruE=
Injection-Date: Thu, 4 Aug 2016 16:20:43 -0000
User-Agent: flnews/0.14pre48 (for NetBSD)
X-Received-Bytes: 4925
X-Received-Body-CRC: 1390911646