Bug in as_HTML() ??

Joe McDonald (joe@vpop.net)
Wed, 16 Apr 1997 23:32:39 -0700


If I grab Netscape's home page and spit it out via:

$h = parse_html($res->content);
print $h->as_HTML();

It fails to include the javascript and messes up the body tag.  Is this a
bug, or am I missing something (I'm probably missing something).  I am
using ver 5.05 on "perl 5.003 with EMBED"

Here is a small proggie that will *not* return the same content that
http://www.netscape.com does:

------------------------------------
#!/usr/local/bin/perl5
use LWP::UserAgent;
use HTML::Parse;

$url = "http://www.netscape.com/";

$ua = new LWP::UserAgent;
$ua->agent("Mozilla/3.0 (Win95; I)"); 


$req = new HTTP::Request 'GET', $url;
$req->header('Accept' => 'text/html');

$res =  $ua->request($req);

if ($res->is_success) {
    $h = parse_html($res->content);
    print $h->as_HTML();
    #print $res->content;
} else {
    print "Request failed...\n";
}
------------------------------------

Thanks,
-joe

P.S.  NewsHub is driven by libwww  -- my thanks to Gisle and team!

=============================================================================
           * NewsHub: Updated every 15 minutes/24 hours a day! *
                          http://newshub.com/