Is it in fact possible to use Flask from a CGI?
If so, how? I am aware of the concise and nice looking documentation for CGI+Flask but it looks to me, like the request.args.get('varname')
function is not working, when run as CGI. It certainly works for me on the same (Apache, Ubuntu 12.10) server when run as WSGI.
I came to the conclusion (or strong suspicion, rather) that args.get()
is not working, after I ran the CGI script on the command line. It would just not pick up anything in QUERY_INFO.
Am I missing something vital about CGI in general, is it a bug in Flask, or what is going on here?
EDIT
The documentation for Flask is updated in git, but at the time of this writing not yet on the homepage. Just don't use any print
in your Flask application and CGI should work fine.