Premature End Of Script Headers

Steve Holden steve at holdenweb.com
Mon Jan 4 23:48:41 CET 2010


Victor Subervi wrote:
> Hi;
> 
> Here's my entire test script:
> 
> #!/usr/bin/python
> 
> def myMail():
>   print 'Content-type: text/html'
>   print
>   print '''
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <title></title>
> <link rel="stylesheet" type="text/css" href="../../css/style.css">
> </head>
> <body>'''
> 
> Here's the error:
> 
> [Mon Jan 04 12:59:15 2010] [error] [client 66.82.9.61] Premature end of
> script headers: mail.py, referer: http://angrynates.com/cart/cart2.py
> 
> [root at 13gems simplemail]# ls -al
> total 60
> drwxr-xr-x 2 beno beno  4096 Jan  4 12:58 .
> drwxrwxrwx 6 beno beno  4096 Jan  4 12:53 ..
> -rwxr-xr-x 1 beno beno   252 Jan  4 06:18 mailer_test.py
> -rwxr-xr-x 1 beno beno   807 Jan  4 06:18 mail_old.py
> -rwxr-xr-x 1 beno beno  2988 Jan  4 12:58 mail.py
> -rwxr-xr-x 1 beno beno 17918 Jan  4 06:18 simplemail.py
> -rwxr-xr-x 1 beno beno 16230 Jan  4 06:18 template.py
> -rwxr-xr-x 1 beno beno   263 Jan  4 06:18 testmail.py
> 
What is this directory listing supposed to tell us?

> What gives?

Perhaps, having defined that nice function, you shoudl call it to
produce some output?

The Apache server is complaining that there's nothing there!

regards
 Steve
-- 
Steve Holden           +1 571 484 6266   +1 800 494 3119
PyCon is coming! Atlanta, Feb 2010  http://us.pycon.org/
Holden Web LLC                 http://www.holdenweb.com/
UPCOMING EVENTS:        http://holdenweb.eventbrite.com/




More information about the Python-list mailing list