summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2011-04-06 21:03:55 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2011-04-06 21:03:55 (GMT)
commit19cf0c34e503e01f669edb702f15ddff11fa47d4 (patch)
tree8b805a20cb2d8ea26d762996b9f079eed947a55b
parentc01def8344fa4e655e8b285fd5ee2b9be80b1a80 (diff)
downloadtip-bot-19cf0c34e503e01f669edb702f15ddff11fa47d4.zip
tip-bot-19cf0c34e503e01f669edb702f15ddff11fa47d4.tar.gz
tip-bot-19cf0c34e503e01f669edb702f15ddff11fa47d4.tar.bz2
tip-bot-19cf0c34e503e01f669edb702f15ddff11fa47d4.tar.xz
Allow LKML-References with a http link
Allow LKML-References of the form: LKML-Reference: http://lkml.kernel.org/r/message-id
-rwxr-xr-xrobotfmt.pl9
1 files changed, 9 insertions, 0 deletions
diff --git a/robotfmt.pl b/robotfmt.pl
index ebf90f9..16c42b3 100755
--- a/robotfmt.pl
+++ b/robotfmt.pl
@@ -4,6 +4,7 @@
#
use Email::Valid;
+use URI::Escape;
($rev, $branches) = @ARGV;
@@ -115,6 +116,14 @@ while (defined($l = <LOG>)) {
if (Email::Valid->address($e)) {
$cclist{$e}++;
}
+ } elsif ($l =~ /^LKML-Reference:\s*http:\/\/lkml.kernel.org\/r\/\<?([^\?\<\>\#]+)\>?$/i) {
+ my $ref = uri_unescape($1);
+ if ($ref ne '' && $ref !~ /[^!#\$\%&'()*+,-.\/0-9:;=?\@A-Z\[\]_`a-z{|}~]/) {
+ $cclist{$lkml}++;
+ if ($ref ne $nullref) {
+ push(@references, $ref);
+ }
+ }
} elsif ($l =~ /^LKML-Reference:\s*(\<.+\>)\s*$/i) {
# We have a thread in which to autopost to LKML...
# Let's be very careful with this...