Ian Bicking ha scritto: > Manlio Perillo wrote: > [...] >> P.S.: I'm reading the cgi module and it only uses argv[1]: >> if sys.argv[1:]: >> qs = sys.argv[1] >> >> I'm not sure to understand. >> >> Moreover in mod_wsgi for nginx, I call PySys_SetArgv, so the WSGI >> application sees the command line options passed to nginx. > > I don't know *why* cgi does this, but as you can imagine it's weird and > unhelpful when it does.
CGI says: Scripts SHOULD check to see if the QUERY_STRING value contains an unencoded "=" character, and SHOULD NOT use the command line arguments if it does. So a CGI script *can* use the command line arguments even if QUERY_STRING is in environment (this seems to be really a mess). What I don't understand is why the cgi module just use argv[1] instead of all the command line arguments. > [...] Manlio Perillo _______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com