in reply to Re: LWP::UserAgent not finishing get requests?
in thread LWP::UserAgent not finishing get requests?

Hmm I don't have a proxy. Does that mean I shouldn't have the $ua->env_proxy; there? I just tried the code without that which didn't help, and also without the timeout setting.

Still the same result... Nothing..

I'm so confused

EDIT: Sorry I forgot to say I have no problems whatsoever from normal browsers or wget... It's definetly isolated to my script. For that matter the LWP::Simple::get works just fine. I'd just use it but I need the cookie and POSTing capabilities of the full UserAgent class.

Replies are listed 'Best First'.
Re^3: LWP::UserAgent not finishing get requests?
by derby (Abbot) on Jan 17, 2009 at 02:45 UTC

    Your script? What about the simple snippet you posted? That too? What's this give you?

    !#/usr/bin/perl use strict; use warnings; use Data::Dumper; use LWP::UserAgent; my $ua = LWP::UserAgent->new; my $response = $ua->get('http://search.cpan.org/'); print Dumper( $response );

    -derby
      Sorry I should have been more clear about that. I meant just running that little snippet from the docs that I posted.

      Anyway it looks like the error was in fact.. me :( (See below)

      Thanks for trying to help me though!

Re^3: LWP::UserAgent not finishing get requests?
by missingthepoint (Friar) on Jan 17, 2009 at 02:49 UTC
    Hmm I don't have a proxy.

    Are you sure? Lots of networks (my ISP included) do transparent proxying to make more efficient use of bandwidth (among other reasons).


    Life is denied by lack of attention,
    whether it be to cleaning windows
    or trying to write a masterpiece...
    -- Nadia Boulanger