perlsgerl has asked for the wisdom of the Perl Monks concerning the following question:

my oh my i am Such a newbie at this. in fact this weekend is my crash course in perl .. literally the first time i've even looked at the stuff. basically i'm trying to pass form info to an executable that resides on a secure server outside of the clients firewall. from within the secure servers network i have no problem conneting via https, however from the clients server a connection is not being made. oh and isn't this typical.. due monday evening! grrrr. argh.. boo hoo.. please help.

*****************
"morons will occassionally say something that's right, but they say it for the wrong reason. a moron is a master of paralogism." ---------- Belbo - Foucault's Pendulum
*****************

Replies are listed 'Best First'.
Re: Post to https from behind firewall
by Trimbach (Curate) on Jun 25, 2001 at 13:53 UTC
    You might have some pretty serious problems depending on how your clients firewall is setup. If the proxy server/firewall is set only to allow communication through port 80 (the web server port) and not any other port, you're hosed. SSL normally requires port 443 to be open... if the proxy server blocks all the ports except 80 no amount of Perl will help you.

    However, it could be that all you need to do is set the proxy settings in your script using LWP. The key is to use the LWP::UserAgent module. From the docs:

    $ua->proxy(...)

    Set/retrieve proxy URL for a scheme:
    $ua->proxy(['http', 'ftp'], 'http://proxy.sn.no:8001/'); $ua->proxy('gopher', 'http://proxy.sn.no:8001/');
    The first form specifies that the URL is to be used for proxying of access methods listed in the list in the first method argument, i.e. 'http' and 'ftp'. The second form shows a shorthand form for specifying proxy URL for a single access scheme.

    Gary Blackburn
    Trained Killer

      thank you sooo much! this seems to have been working like a charm.. and then... the ssl server died... ha ha!! isn't it ironic!! gotta love it! ~ pg ~

      ::::::::::::::::::: ::::::::::::::::::: :::::::::::::::::::
      morons will occassionally say something that's right, but they say it for the wrong reason. a moron is a master of paralogism.
      belbo - foucault's pendulum
      ::::::::::::::::::: ::::::::::::::::::: :::::::::::::::::::