[Tutor] Newbie - Premature end of script headers

Peter Curran peterc73@pacbell.net
Tue, 22 Aug 2000 09:50:32 -0700

Python cognoscenti:

When I upload a cgi script I've written to an Apache server, I get an
Internal Server Error with "premature end of script headers" as the
detail.  The script works OK in pythonwin on my NT4 machine, but I'm
wondering if I need something more for Apache.  I have the appropriate
shebang at the top of the script, so I'm puzzled.

This is the routine that should be triggered:

def massprops(data):
    print "Content-type: text/html\n\n"
    print "<html><head><title>Hello</title></head>"
    print "<body><p>Props Here</p></body>"
    print "</html>"

This is the code that should call that routine:

if __name__ == '__main__':
    sys.stderr = sys.stdout
    form = cgi.FieldStorage()
    data = FeedBackData(form)
    if data.user == 'Peter':

MANY thanks in advance to who(m)ever responds!!  I really appreciate it.

Peter Curran
UniLink Inc.
(415) 751-1285 (h/w)
(415) 378-9663 (m)
(425) 928-5312 (f)