Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: How do you find out if your HTTP response succeeded via LWP?

by Rich36 (Chaplain)
on Nov 14, 2002 at 17:58 UTC ( #212945=note: print w/ replies, xml ) Need Help??


in reply to How do you find out if your HTTP response succeeded via LWP?

Is this code running in a CGI application? If so, the error may be caused by the fact that you are trying to write to a file that you can't write to. If not, the 500 series codes refer to server errors - this may indicate problems on the remote server. Can you post the parameters manually?

Also, you might try using URI::Escape(uri_escape) to escape your query string. There may be characters in there that are causing problems with the post.

One thing that I usually do when running into LWP is use Data::Dumper and print out the UserAgent object ($ua). This shows the contents of the header, the retrieved document, the return code and other useful information. That might help you track down the problem.


«Rich36»


Comment on Re: How do you find out if your HTTP response succeeded via LWP?
Re: Re: How do you find out if your HTTP response succeeded via LWP?
by kleinbiker7 (Sexton) on Nov 26, 2002 at 16:35 UTC
    All is fixed! I needed the receiving script to spit out some stuff (after a Content Type text/html header). Once the script generated this text, the 500 error disappeared (HALLELUJAH!)

    Thanks for all your help on this one. robert

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://212945]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (10)
As of 2015-07-01 21:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (22 votes), past polls