--- lib/Grep/Action/AddFeed.pm 2007/02/18 15:07:03 21 +++ lib/Grep/Action/AddFeed.pm 2007/02/19 10:58:27 26 @@ -24,12 +24,33 @@ my $self = shift; my $value = shift; warn "uri: $value"; - if ($value =~ s/=grep/=%s/) { + if ($value =~ s/\bgrep\b/%s/) { $self->canonicalization_note( uri => 'Replaced grep with %s' ); } return $value; } +=head2 canonicalize_cookie + +Remove C header from beginning and replace EOL with space. + +=cut + +# disabled for now +sub xx_canonicalize_cookie { + my $self = shift; + my $value = shift; + + warn "cookie: $value"; + + $self->canonicalization_note( uri => 'Removed Cookie: header' ) + if ($value =~ s/^Cookie:\s+//); + + $self->canonicalization_note( uri => 'Converted EOL to space' ) + if ($value =~ s/[\n\r]/ /gs); + + return $value; +} =head2 take_action =cut @@ -66,9 +87,9 @@ @feeds = map { my $t = $_; - $t =~ s/=$search_moniker/=%s/; + $t =~ s/\b$search_moniker\b/%s/; $t - } grep(/=$search_moniker/,@feeds); + } grep(/\b$search_moniker\b/,@feeds); $self->result->message('Found ' . @feeds . ' feeds, using first one. ' . join(" ", @feeds) );