January 2019
Beginner to intermediate
776 pages
19h 58m
English
We have used a basic HTTP server setup that can handle CGI requests. Python 3 provides these interfaces in the http.server module. Python 2 had the modules BaseHTTPServer and CGIHTTPserver to offer the same, which were merged in Python into http.server.
The handler is configured to use the /cgi-bin path to launch the CGI scripts. No other path can be used to run the CGI scripts.
The HTML feedback form located on 15_7_send_feedback.html shows a very basic HTML form containing the following code:
<html>
<body>
<form action="/cgi-bin/15_7_get_feedback.py" method="post">
Name: <input type="text" name="Name"> <br />
Comment: <input type="text" name="Comment" />
<input type="submit" value="Submit" />
</form>
</body>
</html>
Note ...
Read now
Unlock full access