Re: Questions About LWP::UserAgent
Daniel Sherer (shererd@std.teradyne.com)
Tue, 18 Mar 1997 10:57:14 -0800
rodney.wines@ahqps.alcatel.fr said:
> First of all, I'm behind a firewall, and some of the servers are on
> the outside.
I, too, perform some requests through a proxy (I suspect most of us do).
The proxy method works perfectly for me.
Add the following code to your robot:
$ua->timeout([$max_time]); # I use 30 seconds
$ua->proxy(http => 'http:// YOUR_PROXY_&_PORT_GO_HERE ');
$ua->no_proxy(qw(teradyne.com)); # list hosts that are 'inside' the wall
rodney.wines@ahqps.alcatel.fr said:
> Another problem I have is with error messages. If I access a server
> directly from my Netscape browser, and if there is a problem, I get a
> detailed message. However, my user agent returns only "500 error
> returned by proxy". Is there a way I can get more detailed
> information as to why a request failed?
Are you examining the request either as_string or through the debugger?
To really see what is going on, I suggest running it in debug mode (add the -d
switch to your ...../perl statement on line 1 of the script).
Then, when you encounter the error, use the "V" command to view EVERYTHING.
Somewhere in there is probably what you are looking for. Hope you can scroll
back, because there is a lot "in there."
Good luck!
Daniel