dhosek has asked for the wisdom of the Perl Monks concerning the following question:
(I've left in some of the things I've tried to examine results/attempt to fix problems.) It appears that I'm not getting headers sent as I would expect from WWW::Mechanize. Any ideas?#!/usr/bin/perl use strict; use warnings; use lib 'lib'; use LWP::Debug qw(+); use WWW::Mechanize; use Data::Dumper; my $polk_url = 'https://ftp.polk.com'; my $mech = WWW::Mechanize->new(agent => 'Mozilla/5.0 (Macintosh; U; In +tel Mac OS X; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16'); $mech->add_header( 'User-Agent' => 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; + rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16', 'Accept' => '*/*', ); my $r = $mech->get($polk_url); print $r->status_line; print $r->content;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tumbleweed Secure File Transfer and WWW::Mechanize
by oko1 (Deacon) on Aug 28, 2008 at 01:47 UTC | |
|
Re: Tumbleweed Secure File Transfer and WWW::Mechanize
by Anonymous Monk on Aug 27, 2008 at 23:35 UTC | |
by dhosek (Beadle) on Aug 28, 2008 at 00:50 UTC | |
by Anonymous Monk on Aug 28, 2008 at 01:28 UTC |