user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <>
To: Wang Kang <>
	Konstantin Ryabitsev <>
Subject: [PATCH] nntp: header responses use CRLF consistently
Date: Wed, 16 Jan 2019 04:58:02 +0000	[thread overview]
Message-ID: <20190116045802.ikm67b4cwigso3tc@dcvr> (raw)
In-Reply-To: <>

Thanks, I'm pretty sure the following will fix it.

Not sure why others hadn't noticed since there's a lot of Alpine
users judging from Message-IDs.  Anyways I managed to replicate it
quickly with alpine in Debian ("alpine -url news://...") and
strace quickly showed me the difference.

Deploying to shortly.
Cc-ing Konstantin for

Subject: [PATCH] nntp: header responses use CRLF consistently

Alpine is apparently stricter than other clients I've tried
w.r.t. using CRLF for headers.  So do the same thing we do for
bodies to ensure we only emit CRLFs and no bare LFs.

Reported-by: Wang Kang <>
 lib/PublicInbox/ | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/PublicInbox/ b/lib/PublicInbox/
index 623ffd3..63d5870 100644
--- a/lib/PublicInbox/
+++ b/lib/PublicInbox/
@@ -515,6 +515,7 @@ sub set_art {
 sub _header ($) {
 	my $hdr = $_[0]->header_obj->as_string;
+	$hdr =~ s/(?<!\r)\n/\r\n/sg;

  reply	other threads:[~2019-01-16  4:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-16  2:54 NNTP served by public-inbox stalled in Alpine 2.21.99 Wang Kang
2019-01-16  4:58 ` Eric Wong [this message]
2019-01-18 21:04   ` [PATCH] nntp: header responses use CRLF consistently Konstantin Ryabitsev
2019-01-19  1:14     ` Wang Kang
2019-01-19  4:41       ` Konstantin Ryabitsev
2019-01-19  4:47         ` Wang Kang
2019-01-16  5:25 ` [Alpine-info] NNTP served by public-inbox stalled in Alpine 2.21.99 Wang Kang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190116045802.ikm67b4cwigso3tc@dcvr \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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).