Currently, I SFTP the file from the web server to the pubs server and redirect the client as such:
Now, for security reasons, I can no longer let the client communicate directly to the pubs server, so everything has to go through the web server in the DMZ.my $redirectURL = 'http://'. $destination_server . '/cgi-bin/pubtools +/ebom.' . $extension . '?XML=' . $randomName; + ## copy our XML to the correct location/filename $logger->info("Report requested, FTP $localfile to $destination_server +"); my $ftp = Net::SFTP->new($destination_server, Debug=>0); $ftp->login($login, $pass) or $logger->error("Could not connect to Pub +s Server"); $ftp->cwd($destination_path) or $logger->error("Could not change direc +tories on Pubs Server"); $ftp->put($localfile, $randomName) or $logger->error("Could not transf +er file to Pubs Server"); $ftp->site('chmod','0666',$randomName) or $logger->error("Could not ch +mod remote file"); $ftp->quit; + ## Now we redirect them to the generated PDF + $logger->info("Redirecting to $redirectURL"); + print $cgi->redirect(-target => 'ResultWindow', -expires => 'now', -ur +i=>$redirectURL);
So instead of redirecting, I need to call this URL directly from the server and stream the data back to the browser. Any idea of how to do this? Thanks.
In reply to Streaming data through web server to browser with CGI by rashley
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |