From eea296391cc0221f6e6901e47321c45c0e371c6d Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Thu, 29 May 2025 19:32:39 +0200 Subject: [PATCH] ParseHeader will now re-merge continuation lines. Signed-off-by: Thomas Hochstein --- doc/ChangeLog | 1 + lib/NewsStats.pm | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index a3de323..dfa6de7 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -3,6 +3,7 @@ NewsStats 0.4.0 (unreleased) * Extract TLH check from HostStats to subroutine, fix no-op check. * Extract getting raw headers from HostStats to subroutine. * Improve documentation for config file. + * ParseHeader: re-merge continuation lines. NewsStats 0.3.0 (2025-05-18) * Extract GroupStats (in gatherstats) to subroutine. diff --git a/lib/NewsStats.pm b/lib/NewsStats.pm index 51e939b..97e75f7 100644 --- a/lib/NewsStats.pm +++ b/lib/NewsStats.pm @@ -280,7 +280,8 @@ sub ParseHeaders { } elsif (/^\s/) { # continuation lines if ($Label) { - $Header{lc($Label)} .= "\n$_"; + s/^\s+/ /; + $Header{lc($Label)} .= $_; } else { warn (sprintf("Non-header line: %s\n",$_)); }