in reply to Perl CGI + Bash script output in wrong order

Dear God, please make sure you put some authentication and restricted IP in front of this.

FWIW, you can just output HTTP headers via the bash script, you don't need to wrap that up into a Perl script. A CGI program can be *anything*.

Also, please don't do it this way. You never want a direct URL to execute a script. Even if you have authentication locked down, you may accidentally call it when you really don't want to.

  • Comment on Re: Perl CGI + Bash script output in wrong order

Replies are listed 'Best First'.
Re^2: Perl CGI + Bash script output in wrong order
by h.chris (Initiate) on Jun 09, 2014 at 15:00 UTC
    Hi,

    Thanks for your suggestions, I did learn we can use BASH to output HTTP headers - however I want move away from bash, so thought this will be a good chance to start with.

    With regards to URL executing script - As I mentioned on my original post, this is just a sample script to re-generate the issue - Original script is NOT a direct URL based one !

    *Please note: the scripts attached are just for debugging purpose

    Regards,