in reply to Re: Force LWP to connect to a proxy for HTTP::Request POST
in thread Force LWP to connect to a proxy for HTTP::Request POST

It screams only for the "POST" but works fine with the "GET"

500 Can't connect to ofgfw1.owfg.com:8080 (Bad hostname 'ofgfw1.owfg.com')

500 Can't connect to ofgfw1.owfg.com:8080 (Bad hostname 'ofgfw1.owfg.com')/

Content-Type: text/plain

Client-Date: Sat, 27 Mar 2010 00:18:14 GMT

Client-Warning: Internal response

The weird thing is that it works fine for "GET"

  • Comment on Re^2: Force LWP to connect to a proxy for HTTP::Request POST

Replies are listed 'Best First'.
Re^3: Force LWP to connect to a proxy for HTTP::Request POST
by Corion (Patriarch) on Mar 27, 2010 at 00:26 UTC
    ... $req = HTTP::Request->new(POST => 'mysite.com/user_login.php'); ...

    It seems you're not supplying a protocol here. Maybe that's the cause of your error. Personally, I would try with WWW::Mechanize and use something like the Mozilla Live HTTP Headers and Wireshark to inspect and compare the network traffic sent by the browser and your script.

      I am supplying a protocol. The script works fine (without requiring a proxy) from a LAN. But I need to run it outside the LAN where I need the proxy to connect.
        Your proxy is the problem, see LWP::Debug to get more info