getmsg.cgi used a "\n^From " pattern to find the end of
one email message and the start of another. this hueristic failed on lines like "\n^From Ushant to Scilly is 35 leagues". the new pattern relies upon our From line ending in the four digits of the year. which is also an hueristic that will from fail from time to time. For example "\n^From 2000 substract 1 to get 1999$". PR: docs/21762
This commit is contained in:
parent
293a1c98a2
commit
aecc5899ee
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=8233
1 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@
|
|||
# by John Fieber
|
||||
# February 26, 1998
|
||||
#
|
||||
# $FreeBSD: www/en/cgi/getmsg.cgi,v 1.23 1999/12/17 14:23:52 phantom Exp $
|
||||
# $FreeBSD: www/en/cgi/getmsg.cgi,v 1.24 2000/01/05 15:47:44 phantom Exp $
|
||||
#
|
||||
|
||||
require "./cgi-lib.pl";
|
||||
|
@ -74,7 +74,7 @@ sub Fetch
|
|||
# Unknown length, guess the end of the E-Mail
|
||||
my($newline) = 0;
|
||||
while(<DATA>) {
|
||||
last if ($newline && /^From /);
|
||||
last if ($newline && /^From .* \d{4}/);
|
||||
if (/^$/) { $newline = 1 } else { $newline = 0; }
|
||||
$message .= $_;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue