]> Sergey Matveev's repositories - public-inbox.git/commit
nntp: fix cross-newsgroup Message-ID lookups
authorEric Wong <e@80x24.org>
Thu, 10 Sep 2020 09:38:39 +0000 (09:38 +0000)
committerEric Wong <e@yhbt.net>
Thu, 10 Sep 2020 19:04:40 +0000 (19:04 +0000)
commit305d728977def1df9ab57778f9cad9dd834ce73d
treecf3f45a47a3aae9eebfa73008f293ff568a1d5f3
parent4e60d74e6cab0a134c0c62785c766b5fa02ac360
nntp: fix cross-newsgroup Message-ID lookups

We cannot blindly use the selected newsgroup for
HEAD/ARTICLE/BODY requests using Message-ID, since
those commands look across all newsgroups; not just
the selected one (if any).

So stuff a reference to the Inbox object into $smsg.
We can reduce args passed into set_nntp_headers() and
msg_hdr_write(), too.

Fixes: 0e6ceff37fc38f28 ("nntp: support slow blob retrievals")
lib/PublicInbox/NNTP.pm
t/nntp.t
t/nntpd.t