* [PATCH 2/4] nntp: move LINE_MAX constant to the top
2019-07-05 22:53 5% [PATCH 0/4] implement NNTP COMPRESS per RFC 8054 Eric Wong
@ 2019-07-05 22:53 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2019-07-05 22:53 UTC (permalink / raw)
To: meta
It'll be accessible from other places, and there was no real
point in having it declared inside a sub.
---
lib/PublicInbox/NNTP.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm
index 9b8b81ec..631fd3c7 100644
--- a/lib/PublicInbox/NNTP.pm
+++ b/lib/PublicInbox/NNTP.pm
@@ -18,6 +18,7 @@ PublicInbox::DS->import(qw(now));
use Digest::SHA qw(sha1_hex);
use Time::Local qw(timegm timelocal);
use constant {
+ LINE_MAX => 512, # RFC 977 section 2.3
r501 => '501 command syntax error',
r221 => '221 Header follows',
r224 => '224 Overview information follows (multi-line)',
@@ -954,7 +955,6 @@ sub event_step {
# only read more requests if we've drained the write buffer,
# otherwise we can be buffering infinitely w/o backpressure
- use constant LINE_MAX => 512; # RFC 977 section 2.3
my $rbuf = $self->{rbuf} // (\(my $x = ''));
my $r = 1;
--
EW
^ permalink raw reply related [relevance 7%]
* [PATCH 0/4] implement NNTP COMPRESS per RFC 8054
@ 2019-07-05 22:53 5% Eric Wong
2019-07-05 22:53 7% ` [PATCH 2/4] nntp: move LINE_MAX constant to the top Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2019-07-05 22:53 UTC (permalink / raw)
To: meta
First 3 patches are pretty straightforward, but 3/4
was disappointing... 4/4 alleviates the disappointment,
but it's kinda scary :>
Now, which newsreaders support COMPRESS?
I've tested my patches to Net::NNTP against news.gmane.org:
https://rt.cpan.org/Ticket/Display.html?id=129967
Eric Wong (4):
nntp: use msg_more as a method
nntp: move LINE_MAX constant to the top
nntp: support COMPRESS DEFLATE per RFC 8054
nntp: reduce server memory overhead of COMPRESS DEFLATE
MANIFEST | 2 +
TODO | 2 -
lib/PublicInbox/DS.pm | 4 +-
lib/PublicInbox/NNTP.pm | 46 +++++--
lib/PublicInbox/NNTPdeflate.pm | 119 ++++++++++++++++++
script/public-inbox-nntpd | 2 +-
t/nntpd-tls.t | 11 ++
t/nntpd-validate.t | 216 +++++++++++++++++++++++++++++++++
t/nntpd.t | 7 ++
9 files changed, 396 insertions(+), 13 deletions(-)
create mode 100644 lib/PublicInbox/NNTPdeflate.pm
create mode 100644 t/nntpd-validate.t
--
EW
^ permalink raw reply [relevance 5%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2019-07-05 22:53 5% [PATCH 0/4] implement NNTP COMPRESS per RFC 8054 Eric Wong
2019-07-05 22:53 7% ` [PATCH 2/4] nntp: move LINE_MAX constant to the top Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).