Skip Menu |

This queue is for tickets about the libwww-perl CPAN distribution.

Report information
The Basics
Id: 31347
Status: resolved
Priority: 0/
Queue: libwww-perl

Owner: Nobody in particular
Requestors: [...]

Bug Information
Severity: Normal
Broken in: 5.808
Fixed in: (no value)


Subject: lwp-request doesn't honour options -b while dumping links
Download (untitled) / with headers
text/plain 609b
Hi, this is a bug that was reported to Debian some time ago, and we solved it with a small patch (included). This is the original bug text: suppose you have retrieved a copy of http:/a.b.c/d/e.html and saved it in a local repository /my/repo, and then you want to extract links (based on the original url) from the saved file. the first thing that comes to my mind, $ lwp-request -o links -b http:/a.b.c/d/e.html file:/my/repo/e.html does not work, because lwp-request picks the base url from the url it is parsing (namely file:/my/repo/e.html) Please consider including it in the next release. Thanks.
Subject: lwp-request_use_base_when_dumping_links.patch
Index: libwww-perl/bin/lwp-request =================================================================== --- libwww-perl.orig/bin/lwp-request +++ libwww-perl/bin/lwp-request @@ -473,6 +473,7 @@ while ($url = shift) { }; $options{'o'} eq 'links' && do { my $base = $response->base; + $base = $options{'b'} if $options{'b'}; for ( @{ $html->extract_links } ) { my($link, $elem) = @$_; my $tag = uc $elem->tag;
Applied. Thanks!

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to