chiark / gitweb /
truncation: include header name in warning header
[modbot-ulm.git] / stump / bin / submission.pl
index 565d2d462c7fb6cf200ccc48c49180229f8d8c81..fa98e930f7b3abc5978bf787126b72686b438585 100755 (executable)
@@ -344,12 +344,13 @@ sub readMessage {
        # But, first, a wrinkle ...
        if (!m/^(?:References):/i) {
          push @unfolded, (m/^[^:]+:/ ? $& : '????')
-           if s/\n(?=.)/ /g;
+           if s/\n(?=.)//g;
          if (length $_ > 505) { #wtf
            $_ = substr($_, 0, 500);
            $_ =~ s/\n?$/\n/;
            $readahead = $_;
-           $_ = $warning->("Next header truncated!");
+           m/^[0-9a-z-]+/i;
+           $_ = $warning->("Next header ($&) truncated!");
          }
        }
       } else {