Skip Menu |

This queue is for tickets about the Feed-Find CPAN distribution.

Report information
The Basics
Id: 77144
Status: resolved
Priority: 0/
Queue: Feed-Find

People
Owner: cpan [...] stupidfool.org
Requestors: cpan [...] danonline.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 0.06
  • 0.07
Fixed in: (no value)



Subject: t/01-find.t fails because stupidfool.org rejects libwww-perl user-agent string
t/01-find.t fails because it uses LWP::UserAgent to attempt to get http://stupidfool.org/perl/feeds/anchors-only.html. Unfortunately, requests to that URL that use a user-agent string containing 'libwww-perl' get a 403 Forbidden, and the messsage "The owner of this website (stupidfool.org) has banned your access based on your browser's signature (40d15967-cl-ua-21). (Ref. 1010)". A CloudFlare copyright also appears on the page. Note that when the request is made using Feed::Find->find, Feed::Find sets its own user-agent string and therefore does not run into this problem. Please either configure your server to accept requests from a user-agent containing 'libwww-perl', or change the test to explicitly set a user-agent string. Here is the complete output of that test in File-Find-0.07: perl -Ilib t/01-find.t 1..4 ok 1 ok 2 not ok 3 # Failed test at t/01-find.t line 19. # got: '0' # expected: '1' not ok 4 # Failed test at t/01-find.t line 20. # got: undef # expected: 'http://stupidfool.org/perl/feeds/ok.xml' # Looks like you failed 2 tests of 4. I'm using perl 5.12.4 built for x86_64-linux-thread-multi, and LWP 6.02. Please let me know if there is any additional information I can provide. Thank you!
I got this problem too which is rather a silly failure. It would be more sensible to check the value of $res->is_success () and skip the two tests if it is not a successful request: my $res = $ua->request($req); @feeds = Feed::Find->find_in_html(\$res->content, BASE . 'anchors- only.html'); is(scalar @feeds, 1); is($feeds[0], BASE . 'ok.xml'); should be something like my $res = $ua->request($req); skip "Reqest failed", 2 if ! $res->is_success (); @feeds = Feed::Find->find_in_html(\$res->content, BASE . 'anchors- only.html'); is(scalar @feeds, 1); is($feeds[0], BASE . 'ok.xml');
I also ran into this failure.
Fixed. Configuration error on stupidfool.org.