Skip Menu |

This queue is for tickets about the XML-FOAF CPAN distribution.

Report information
The Basics
Id: 8724
Status: new
Priority: 0/
Queue: XML-FOAF

People
Owner: Nobody in particular
Requestors: iwai [...] alib.jp
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: 0.02



Subject: handling the W3C Note "XHTML Media Types"
XML::FOAF 0.02 can't understand XHTML Media Types. <http://www.w3.org/TR/xhtml-media-types/> This patch handling some media types - "application/xhtml+xml", "application/xml" and "text/xml".
diff -uNr XML-FOAF-0.02.orig/lib/XML/FOAF.pm XML-FOAF-0.02/lib/XML/FOAF.pm --- XML-FOAF-0.02.orig/lib/XML/FOAF.pm 2003-06-25 07:35:40.000000000 +0900 +++ XML-FOAF-0.02/lib/XML/FOAF.pm 2004-12-03 23:21:01.000000000 +0900 @@ -77,7 +77,8 @@ my $ua = $foaf->{ua}; my $req = HTTP::Request->new(GET => $url); my $res = $ua->request($req); - if ($res->content_type eq 'text/html') { + if ($res->content_type eq ('text/html'||'application/xhtml+xml'|| + 'application/xml'||'text/xml')) { my $foaf_url; my $find_links = sub { my($tag, $attr) = @_;