Re: CGI script works in IIS5 but not in IIS6

From: David Wang [Msft] (someone_at_online.microsoft.com)
Date: 11/03/04


Date: Wed, 3 Nov 2004 00:50:36 -0800

By design.

Setting the MIME Type has no effect because those values are used by the
Static File handler to set the Content type. Python is considered a
"dynamic script file" (since you set up a script mapping and web service
extension) which is responsible for sending its own "Content-Type" -- it has
the power to send whatever it wants, unaffected by Static File nor MIME
Type.

You seem to have solved your problem by adding "Content-Type: text/html\n"
to the Python script, which is what you are supposed to do. CGI spec has
always specified this requirement -- IIS6 is simply enforcing it while IIS5
was more lax (on many fronts).

-- 
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"CL" <CL@discussions.microsoft.com> wrote in message
news:1212B9B8-B7CC-4EA5-8959-0B88CFA3C759@microsoft.com...
I've installed python 2.2.2 under IIS6, configured all script mapping and
web
service extension. However the script which works under IIS5 does not work
with IIS6 and required an additional line of print "Content-type:
text/html\n"
I'm not sure why?? But setting the MIME type is also not helping..
It's not recognizing the content as in IIS5. What else should be
configured???


Relevant Pages

  • Re: perl to python
    ... sed and perl can let you do all that quick command line stuff. ... into a full blown script. ... scripts, call it from the python interpreter, whatever I need. ... If I stick to the traditional unix approach, ...
    (comp.lang.python)
  • Re: Learning Tkinter
    ... and how the command option is used to call the function callback. ... gui programming to see if the python programs I have written can be made ... search their computer for this file, execute the python code and then ... This is the meaning of the test on __name__: this magical variable is set to the string '__main__' if and only if the current script is the top-most one, i.e the one you ran python on. ...
    (comp.lang.python)
  • Correct way to handle independent interpreters when embedding in a single-threaded C++ app
    ... The Python interpreter is ... interpreter and provides an extension module to expose ... manage each script runs in a new interpreter. ... globals that could cause issues. ...
    (comp.lang.python)
  • Re: bash vs. python scripts - which one is better?
    ... Quick, take your one liner, have it traverse an entire directory tree ... For me I just need to change my small script into a function, ... That is where shell falls down. ... alternatives like Python, Perl or Ruby laying around to be used. ...
    (Debian-User)
  • Re: Correct way to handle independent interpreters when embedding in a single-threaded C++ app
    ... Since you are not running any python scripts or calling any python ... This will also ensure that execution of one script wont ... the script and thus shut down the interpreter. ...
    (comp.lang.python)