[Web-SIG] HTTP_CONTENT_TYPE and HTTP_CONTENT_LENGTH
Manlio Perillo
manlio_perillo at libero.it
Wed Dec 12 22:29:26 CET 2007
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
More information about the Web-SIG
mailing list