http://www.perlmonks.org?node_id=212945


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»

Replies are listed 'Best First'.
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