chiark
/
gitweb
/
~webstump
/
modbot-urcm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ef1411
)
truncation: adjust limit, and fix handling so we can do that in one place
origin/master
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 5 Sep 2018 13:42:37 +0000
(14:42 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 5 Sep 2018 13:42:37 +0000
(14:42 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
stump/bin/submission.pl
patch
|
blob
|
history
diff --git
a/stump/bin/submission.pl
b/stump/bin/submission.pl
index e1ca10453f51086bfa6110c787f2da878ec66e66..cb12a290cdcad7ce92c1b0838dabb8e3be1a0675 100755
(executable)
--- a/
stump/bin/submission.pl
+++ b/
stump/bin/submission.pl
@@
-351,9
+351,11
@@
sub readMessage {
if (!m/^(?:References):/i) {
push @unfolded, (m/^[^:]+:/ ? $& : '????')
if s/\n(?=.)//g;
- if (length $_ > 505) { #wtf
- $_ = substr($_, 0, 500);
- $_ =~ s/\n?$/\n/;
+ my $maxlen = 510;
+ if (length $_ > $maxlen+1) { # $maxlen plus one \n
+ chomp;
+ $_ = substr($_, 0, $maxlen);
+ $_ .= "\n";
$readahead = $_;
m/^[0-9a-z-]+/i;
$_ = $warning->("Next header ($&) truncated!");