* [PATCH 02/12] nntp: HDR returns 225, not 224
2015-09-30 21:00 6% [PATCH 0/12] another round of NNTP updates Eric Wong
@ 2015-09-30 21:00 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2015-09-30 21:00 UTC (permalink / raw)
To: meta
This is stipulated by RFC 3977 8.5.1, but apparently I misread it.
---
lib/PublicInbox/NNTP.pm | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm
index 95aa4af..faa7563 100644
--- a/lib/PublicInbox/NNTP.pm
+++ b/lib/PublicInbox/NNTP.pm
@@ -16,6 +16,7 @@ use constant {
r501 => '501 command syntax error',
r221 => '221 Header follows',
r224 => '224 Overview information follows (multi-line)',
+ r225 => '225 Headers follow (multi-line)',
r430 => '430 No article with that message-id',
long_response_limit => 0xffffffff,
};
@@ -554,7 +555,7 @@ sub hdr_message_id ($$$) { # optimize XHDR Message-ID [range] for slrnpull.
return $r unless ref $r;
my $mm = $self->{ng}->mm;
my ($beg, $end) = @$r;
- more($self, '221 Header follows');
+ more($self, $xhdr ? r221 : r225);
$self->long_response($beg, $end, sub {
my ($i) = @_;
my $mid = $mm->mid_for($$i);
@@ -597,7 +598,7 @@ sub hdr_xref ($$$) { # optimize XHDR Xref [range] for rtin
my $ng = $self->{ng};
my $mm = $ng->mm;
my ($beg, $end) = @$r;
- more($self, '221 Header follows');
+ more($self, $xhdr ? r221 : r225);
$self->long_response($beg, $end, sub {
my ($i) = @_;
my $mid = $mm->mid_for($$i);
@@ -644,7 +645,7 @@ sub hdr_searchmsg ($$$$) {
my $r = get_range($self, $range);
return $r unless ref $r;
my ($beg, $end) = @$r;
- more($self, '221 Header follows');
+ more($self, $xhdr ? r221 : r225);
$self->long_response($beg, $end, sub {
my ($i) = @_;
my $mid = $mm->mid_for($$i) or return;
@@ -702,7 +703,7 @@ sub hdr_mid_response ($$$$$$) {
$res .= r221 . "\r\n";
$res .= "$mid $v\r\n" if defined $v;
} else {
- $res .= r224 . "\r\n";
+ $res .= r225 . "\r\n";
if (defined $v) {
my $pfx = hdr_mid_prefix($self, $xhdr, $ng, $n, $mid);
$res .= "$pfx $v\r\n";
@@ -726,7 +727,7 @@ sub hdr_slow ($$$$) {
my $r = get_range($self, $range);
return $r unless ref $r;
my ($beg, $end) = @$r;
- more($self, $xhdr ? r221 : r224);
+ more($self, $xhdr ? r221 : r225);
$self->long_response($beg, $end, sub {
my ($i) = @_;
$r = $self->art_lookup($$i, 2);
--
EW
^ permalink raw reply related [relevance 7%]
* [PATCH 0/12] another round of NNTP updates
@ 2015-09-30 21:00 6% Eric Wong
2015-09-30 21:00 7% ` [PATCH 02/12] nntp: HDR returns 225, not 224 Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2015-09-30 21:00 UTC (permalink / raw)
To: meta
This is probably performant enough for practical use :)
Eric Wong (12):
search: remove get_subject_path
nntp: HDR returns 225, not 224
nntp: reduce syscalls for LIST OVERVIEW.FMT
remove unnecessary fields usage
daemon: always autoflush stdout/stderr
nntpd: avoid lazy require
INSTALL: document Danga::Socket dependency for nntpd
nntp: MODE READER denies posting
nntp: implement LIST HEADERS
nntp: implement OVER/XOVER summary in search document
t/nntpd.t: simplify condition for response termination
t/nntpd.t: additional tests for XHDR/HDR
INSTALL | 2 +
lib/PublicInbox/Daemon.pm | 3 +
lib/PublicInbox/GitCatFile.pm | 5 +-
lib/PublicInbox/Hval.pm | 9 +--
lib/PublicInbox/Mbox.pm | 11 ++-
lib/PublicInbox/Msgmap.pm | 4 +-
lib/PublicInbox/NNTP.pm | 175 ++++++++++++++++++++----------------------
lib/PublicInbox/NewsGroup.pm | 25 +++---
lib/PublicInbox/Search.pm | 43 ++++++++---
lib/PublicInbox/SearchIdx.pm | 59 ++++++++++----
lib/PublicInbox/SearchMsg.pm | 86 +++++++++++++--------
lib/PublicInbox/SearchView.pm | 19 ++---
public-inbox-nntpd | 19 +++--
t/nntpd.t | 46 ++++++++++-
t/search.t | 2 +-
15 files changed, 305 insertions(+), 203 deletions(-)
^ permalink raw reply [relevance 6%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2015-09-30 21:00 6% [PATCH 0/12] another round of NNTP updates Eric Wong
2015-09-30 21:00 7% ` [PATCH 02/12] nntp: HDR returns 225, not 224 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).