You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# We know it will not contain any new lines at present
my$folded = "";
while (length$line) {
if ($line =~ s/^(.{0,$limit})(\s|\z)//) {
$folded .= $1 . $crlf;
$folded .= $indentiflength$line;
} else {
# Basically nothing we can do. :(
$folded .= $line . $crlf;
last;
}
}
return$folded;
}
Consider
diff --git a/t/folding.t b/t/folding.t
index 9ef51cb..4e0d652 100644
--- a/t/folding.t
+++ b/t/folding.t
@@ -43,3 +43,3 @@ END
- my $subject = 'A ' x 50; # Long enough to need to be folded
+ my $subject = "A\t" x 50; # Long enough to need to be folded
@@ -54,2 +54,3 @@ END
unlike($email_1->as_string, qr/\Q$subject/, "we fold the 50-A line");
+ like($email_1->as_string =~ s/\r\n(?=[ \t])//gr, qr/\Q$subject/, "we fold the 50-A line reversibly");
}
The additional test fails. I think the correct thing to do is along the lines of
RFC2822 and RFC5322 define folding as
and unfolding as
By the above definition, it is
unfold(fold(input)) = input
. However,sub __fold_objless
replaces the originalWSP
by$indent
. What is its use case?Email-Simple/lib/Email/Simple/Header.pm
Lines 428 to 445 in 041c3f7
Consider
The additional test fails. I think the correct thing to do is along the lines of
The text was updated successfully, but these errors were encountered: