Package: libwww-perl Version: 5.803-3 Severity: normal Tags: patch
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) A 1-line patch is attached regards g.b. -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.8-2-686 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Versions of packages libwww-perl depends on: pn libdigest-md5-perl Not found. ii libhtml-parser-perl 3.45-1 A collection of modules that parse ii libhtml-tree-perl 3.18-1 represent and create HTML syntax t ii liburi-perl 1.30-1 Manipulates and accesses URI strin ii perl [libmime-base64-perl] 5.8.4-6 Larry Wall's Practical Extraction ii perl-modules [libnet-perl] 5.8.4-6 Core Perl modules -- no debconf information
--- lwp-request.old 2005-01-01 02:30:18.000000000 +0100 +++ lwp-request 2005-02-10 17:56:24.000000000 +0100 @@ -462,6 +462,7 @@ }; $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;