[Web-SIG] CGI in PEP 444

James Y Knight foom at fuhm.net
Tue Jan 4 21:04:23 CET 2011


On Jan 4, 2011, at 1:24 PM, Antoine Pitrou wrote:
> (for the record, the leading Web scripting language, PHP, has moved away from
> CGI and standardized on mod_php eons ago)

Yet also still offers a cgi if you want to use that instead.

CGI is a wonderful lowest-common-denominator. It's a great option for little scripts which are infrequently run.

I don't get the hatred: it's old (this is a GOOD thing!), it works, and everything supports it.

Back to the subject of this thread: A simple CGI server is useful because it's simple enough that you can include it in the spec, to demonstrate how to handle various bits of WSGI. And anyone writing a webserver understands CGI, and can understand that. A complete HTTP implementation would not be simple enough to write into the spec.

Obviously if you write your app to the WSGI spec, you will want to deploy it on an existing HTTP server or cgi wrapper in the stdlib (or whatever else you want, that's the whole point!). Users aren't going to be copy and pasting the text from the spec to run their app. So, really, what's the problem?

James


More information about the Web-SIG mailing list