RFR: 2641: Mbox parser fails on headers that start with newline

Erik Joelsson erikj at openjdk.org
Fri Dec 19 15:16:10 UTC 2025


It seems that at least for Mailman 3 mbox data, header values will sometimes start on the next line, after a single space, instead of directly after a single space following the `:`. E.g. this:


Subject:
 foo


Instead of this:


Subject: foo


This patch adjusts the regexp used to parse mbox email headers to take this into account, by optionally matching this newline. Added a some more test to verify the various cases.

-------------

Commit messages:
 - SKARA-2641

Changes: https://git.openjdk.org/skara/pull/1748/files
  Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1748&range=00
  Issue: https://bugs.openjdk.org/browse/SKARA-2641
  Stats: 52 lines in 2 files changed: 51 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/skara/pull/1748.diff
  Fetch: git fetch https://git.openjdk.org/skara.git pull/1748/head:pull/1748

PR: https://git.openjdk.org/skara/pull/1748


More information about the skara-dev mailing list