<div dir="ltr">Hi Brent,<div><br></div><div>There are several Plack modules that allow you to run CGIs in a Plack/PSGI environment; have a look at the articles for days 10 and 9 in the Plack advent calendar for details of the different options:</div><div><br></div><div><a href="http://advent.plackperl.org/2009/12/page/2/" target="_blank">http://advent.plackperl.org/2009/12/page/2/</a>  (towards the bottom of the page)<br></div><div><br></div><div>Amelia.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 3 March 2016 at 11:44,  <span dir="ltr"><<a href="mailto:Brent.N.Jones@wellsfargo.com" target="_blank">Brent.N.Jones@wellsfargo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">






<div>
<font face="Calibri" size="2"><span style="font-size:11pt">
<div>I have a need to call a CGI script that resides in cgi-bin from a Dancer application.  My CGI application is simple:</div>
<div> </div>
<div>use CGI;</div>
<div>use JSON;</div>
<div> </div>
<div>my $cgi = new CGI();</div>
<div>print $cgi->header();</div>
<div> </div>
<div># Get the CSRF Token fnd the user rom cookie</div>
<div>my $CSRFToken = `/apps/www/cgi-bin/rsacookie -g -CSRFToken`;</div>
<div>my $user = `/apps/www/cgi-bin/rsacookie -g -user`;</div>
<div> </div>
<div>my %rec_hash = ('token'=>$CSRFToken, 'user'=>$user );</div>
<div>my $json = encode_json \%rec_hash;</div>
<div>print $json;</div>
<div> </div>
<div>The rsacookie is a binary that reads a client side cookie from an authenticated user. The Dancer application is secured by RSA’s web agent.  The agent writes a cookie that can only be read by the rsacookie applet.  Once I authenticate with the agent, the
above script works when called from the cgi-bin directory in a different browser tab/window, however when I call the script from within Dancer the rsacookie applet cannot find a valid cookie.  Since the rsacookie applet requires to be ran in the CGI environment,
how can I call it from Dancer and maintain the CGI env?  My dancer app is deployed with Plack/PSGI.</div>
<div> </div>
<div>Thanks.</div>
<div>Brent</div>
<div> </div>
<div> </div>
</span></font>
</div>

<br>_______________________________________________<br>
dancer-users mailing list<br>
<a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a><br>
<a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" rel="noreferrer" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
<br></blockquote></div><br></div>