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

Re^3: GD and LWP giving 500 errors

by huck (Parson)
on Mar 16, 2017 at 23:14 UTC ( #1184939=note: print w/replies, xml ) Need Help??

in reply to Re^2: GD and LWP giving 500 errors
in thread GD and LWP giving 500 errors

Meanwhile, anyone got a non-LWP way of POSTing?

now i am confused, you cant reach the hosting site with LWP from somewhere else? or the hosting site cant reach other sites with LWP?

Replies are listed 'Best First'.
Re^4: GD and LWP giving 500 errors
by Schmunzie (Sexton) on Mar 17, 2017 at 11:10 UTC
    Thank you. This has proved extremely useful. I've been able to replace a swathe of LWP code with
    $result=qx(curl -X POST --data "$query" ' +n/webscr');
    and it seems to work.

    The bit that is now confusing me is how to replace LWP's

    is_error(status) and is_success(status)

    There is barely a mention of response codes in the curl documentation.


    Thanks to a search of StackOverflow, I now have a working workaround that give me access to the response code

    read (STDIN, $query, $ENV{'CONTENT_LENGTH'}); $query .= '&cmd=_notify-validate'; my ($head,$body) = split( m{\r?\n\r?\n}, qx(curl -X POST --data "$que +ry" -si ''),2 ); my ($code) = $head =~m{\A\S+ (\d+)};
Re^4: GD and LWP giving 500 errors
by Schmunzie (Sexton) on Mar 16, 2017 at 23:26 UTC
    The latter.

    Thanks for the link

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2019-09-21 06:59 GMT
Find Nodes?
    Voting Booth?
    The room is dark, and your next move is ...

    Results (270 votes). Check out past polls.