INN commit: branches/2.6 (doc/pod/news.pod frontends/mailpost.in)

INN Commit rra at isc.org
Tue Jul 11 19:39:27 UTC 2017


    Date: Tuesday, July 11, 2017 @ 12:39:27
  Author: iulius
Revision: 10165

mailpost: remove empty header lines within header body

Modified:
  branches/2.6/doc/pod/news.pod
  branches/2.6/frontends/mailpost.in

-----------------------+
 doc/pod/news.pod      |    6 ++++--
 frontends/mailpost.in |    5 +++++
 2 files changed, 9 insertions(+), 2 deletions(-)

Modified: doc/pod/news.pod
===================================================================
--- doc/pod/news.pod	2017-07-11 19:38:46 UTC (rev 10164)
+++ doc/pod/news.pod	2017-07-11 19:39:27 UTC (rev 10165)
@@ -18,8 +18,10 @@
 =item *
 
 B<mailpost> now removes empty header fields before attempting to post
-articles, and keeps trace of them in the X-Mailpost-Empty-Hdrs: header
-field body.  Thanks to Kamil Jonca for the bug report.
+articles, and keeps trace of them in the X-Mailpost-Empty-Hdrs: newly
+generated header field body.  Also, B<mailpost> now sanitizes header
+fields with regards to empty continuation header lines.  Thanks to
+Kamil Jonca for these bug reports.
 
 =item *
 

Modified: frontends/mailpost.in
===================================================================
--- frontends/mailpost.in	2017-07-11 19:38:46 UTC (rev 10164)
+++ frontends/mailpost.in	2017-07-11 19:39:27 UTC (rev 10165)
@@ -217,6 +217,11 @@
     next if /^Approved:\s/sio && defined($approved);
     next if /^Distribution:\s/sio && defined($distribution);
 
+    # Remove empty header lines within header body.
+    s/\n[ \t]+\n/\n/g;          # middle lines in header field
+    s/\n[ \t]+$//;              # last line in header field
+    s/^([^:]+:[ \t]+)\n/$1/;    # first line in header field
+
     # Collect empty header field names.
     if (/^([^:]+):\s*$/) {
         # 975 = 998 - length("X-Mailpost-Empty-Hdrs: ")



More information about the inn-committers mailing list