Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Thanks again,

I tried the script, adding the dump line again and it came back with the following results

A successfull 200 OK comes out like this

E:\ovXtras\SCRIPTING>debugurltestv5.pl http://www.elm.com.sa http://192.168.5.5:8080/ 200 OK Err : (9)(Bad file descriptor)(0)() Can't locate object method "dump" via package "HTTP::Headers" at (eval + 28) line 1.

while an unsuccessful attempt has some additional info

E:\ovXtras\SCRIPTING>debugurltestv5.pl https://www.ehealth.com.sa http://192.168.5.5:8080/ 500 Internal Server Error Err : (9)(Bad file descriptor)(10038)(An operation was attempted on so +mething that is not a socket) Can't locate object method "dump" via package "HTTP::Headers" at (eval + 28) line 1.

Can anything be concluded from this?

My present code below

# !C:\Perl\bin use strict; use warnings; use LWP::UserAgent; #@ARGV = qw[ http://www.eserve.com.sa/ ]; my $url = shift or die "URL expected\n"; my $useragent = LWP::UserAgent->new; $useragent->proxy(['http', 'ftp','https'], 'http://192.168.5.5:8080/') +; $useragent -> timeout( 20 ); my $request = HTTP::Request->new( GET => $url ); my $response = $useragent->request($request); my $err = sprintf "(%d)(%s)(%d)(%s)\n", $!,$!,$^E,$^E; print $useragent->proxy('http'),"\n"; print $response->status_line, "\n"; print "Err : $err \n"; print $response->dump,"\n";

In reply to Re^6: LWP - 500 Internal Error by oalvi
in thread LWP - 500 Internal Error by oalvi

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-25 11:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found