ff has asked for the wisdom of the Perl Monks concerning the following question:
The non-working invocation reports that:sub request { my($self, $request, $arg, $size, $previous) = @_; LWP::Debug::trace('()'); my $response = $self->simple_request($request, $arg, $size); my $wmsgB = Dumper( $response ); # I added this line to UserAgent.pm print "D-rsp:\n$wmsgB\n"; # I added this line to UserAgent.pm my $code = $response->code; $response->previous($previous) if defined $previous; print $LOGF "code: '$code'\n"; # I added this line to UserAgent.pm
while the working version gives:D-rsp: $VAR1 = bless( { '_content' => '500 EOF ', '_rc' => 500, '_headers' => bless( { 'client-warning' => 'Internal response', 'client-date' => 'Thu, 13 Apr 2006 05:04:04 GMT', 'content-type' => 'text/plain' }, 'HTTP::Headers' ), '_msg' => 'EOF', '_request' => bless( { '_content' => 'Email=brig.johnson&Passwd=a3512j&null=S +ign+in', '_uri' => bless( do{\(my $o = 'https://www.google.com/ +accounts/ServiceLoginBoxAuth')}, 'URI::https' ), '_headers' => bless( { 'user-agent' => 'User-Agent: Mozilla/5.0 (W +indows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1. +0.4', 'content-type' => 'application/x-www-form-u +rlencoded' }, 'HTTP::Headers' ), '_method' => 'POST' }, 'HTTP::Request' ) }, 'HTTP::Response' ); code: '500'
D-rsp: $VAR1 = bless( { '_protocol' => 'HTTP/1.1', '_content' => ' <html> <head> <script type="text/javascrip +t" language="JavaScript"><!-- function doRedirect(url) { open(url, "_top"); } //--> </script> <script type="text/javascript" language="JavaScript1.4 +"><!-- function doRedirect(url) { try { open(url, "_top"); } catch (xcp) { insertContinueLink(); } } //--> </script> <script type="text/javascript" language="EcmaScript">< +!-- etc... code: '200'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why might LWP::UserAgent be failing with '500 EOF'?
by ikegami (Patriarch) on Apr 13, 2006 at 06:25 UTC | |
by ff (Hermit) on Apr 13, 2006 at 06:40 UTC | |
by ff (Hermit) on Apr 18, 2006 at 04:11 UTC | |
by andylockran (Initiate) on May 17, 2010 at 09:36 UTC |