That does not work for headers with multiple values
On Fri, 26 Nov 2021 at 13:50, <[email protected]> wrote: > > This is an automated email from the ASF dual-hosted git repository. > > humbedooh pushed a commit to branch master > in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git > > > The following commit(s) were added to refs/heads/master by this push: > new 146f15c Strip superfluous whitespace from vital headers > 146f15c is described below > > commit 146f15cc5a97d741bcfcd5a6584f82a49490d053 > Author: Daniel Gruno <[email protected]> > AuthorDate: Fri Nov 26 14:50:20 2021 +0100 > > Strip superfluous whitespace from vital headers > --- > tools/archiver.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/archiver.py b/tools/archiver.py > index 8256fac..b3859ea 100755 > --- a/tools/archiver.py > +++ b/tools/archiver.py > @@ -475,7 +475,7 @@ class Archiver(object): # N.B. Also used by > import-mbox.py > ) > else: > hval += t[0].decode(t[1], errors="ignore") > - msg_metadata[key] = hval > + msg_metadata[key] = hval.strip() > except Exception as err: > print("Could not decode headers, ignoring..: %s" % err) > message_date = None
