Changeset 1011

Show
Ignore:
Timestamp:
06/22/06 17:27:11
Author:
miyagawa
Message:

Aggregator::Simple: remove charset= bit from Content-Type. more liberal RSS detect regexp

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Aggregator/Simple.pm

    r1010 r1011  
    3636                       $res->http_response->content_type || 
    3737                       "text/xml"; 
     38 
     39    $content_type =~ s/;.*$//; # strip charset= cruft 
    3840 
    3941    my $content = $res->content; 
     
    5658sub looks_like_feed { 
    5759    my($self, $content_ref) = @_; 
    58     $$content_ref =~ m!<rss\s+version="|<rdf:RDF\s+xmlns="http://purl\.org/rss|<feed\s+xmlns="!s; 
     60    $$content_ref =~ m!<rss |<rdf:RDF\s+xmlns="http://purl\.org/rss|<feed\s+xmlns="!s; 
    5961} 
    6062