You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I realize this is a bad time to discover this issue however, I've noticed that I've been coding my server incorrectly when it comes to executing CGI scripts. I may have missed the lecture where this was discussed but I was assuming they were handled as plain text and executed through some sort of function after the information was parsed similar to the "WeMustProtectThisHouse!" files. However, I realize I was dreadfully wrong.
Could you possibly link me to a resource on how this is done using python? I've reviewed the lecture slides, RFC 3875, and various resources on the web. Nothing does well at explaining how to remotely execute a CGI file via Python given a path. The resource linked in the powerpoint lecture "http://hoohoo.ncsa.uiuc.edu/cgi/" is currently down. There are many resources on what CGI is and what it does but my issue is in this context how would I go about executing the script from my web server file.
Thank you for any help.
The text was updated successfully, but these errors were encountered:
Python has a standard module to run processes called subprocess. Read the documentation to explore how to connect to the STDIN, STDOUT, and STDERR and how to pass environment variables to the process.
Is this something that will work stand-alone in this context? There seems to be something I need to do with perl. I'm guessing it needs to be installed via docker?
CGI scripts can be written in any language as long as they can be executed as scripts, take input from environment variables and STDIN and yield output on STDOUT in a specific format. The scripts supplied in the test suit are written in Perl, which means your Docker image should have basic Perl runtime environment installed in it. Luckily, Perl is one of the ubiquitous runtimes in Linux distros, so most likely it will already be present in your base image, but if you are using a minimal base image then you will have to write necessary instructions in your Dockerfile to install Perl.
I realize this is a bad time to discover this issue however, I've noticed that I've been coding my server incorrectly when it comes to executing CGI scripts. I may have missed the lecture where this was discussed but I was assuming they were handled as plain text and executed through some sort of function after the information was parsed similar to the "WeMustProtectThisHouse!" files. However, I realize I was dreadfully wrong.
Could you possibly link me to a resource on how this is done using python? I've reviewed the lecture slides, RFC 3875, and various resources on the web. Nothing does well at explaining how to remotely execute a CGI file via Python given a path. The resource linked in the powerpoint lecture "http://hoohoo.ncsa.uiuc.edu/cgi/" is currently down. There are many resources on what CGI is and what it does but my issue is in this context how would I go about executing the script from my web server file.
Thank you for any help.
The text was updated successfully, but these errors were encountered: