Go Back   Velocity Reviews > Newsgroups > Python
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

Python - Re: An error ?

 
Thread Tools Search this Thread
Old 06-12-2006, 08:07 AM   #1
Default Re: An error ?


Bo Yang wrote:
> Hi ,
> I am confronted with an odd question in the python cgi module !
>
> Below is my code :
>
> import cgitb ; cgitb.enable()
> import cgi
>
> print "Hello World !"
>
> How easy the script is , and the url is 202.113.239.51/vote/cgi/a.py
> but apache give me a 'Server internal error !'
> and the error log is :
>
>
> [Fri Jun 16 14:06:45 2006] [error] [client 10.10.110.17] malformed
> header from script. Bad header=Hello World!: a.py
>
> I wish somebody could help me , thanks in advance !
>

You don't include any HTTP headers. This is easily corrected: try instead:

import cgitb ; cgitb.enable()
import cgi

print "Content-Type: text\plain\n"
# note the extra blank line terminate the headers
print "Hello World !"


regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Love me, love my blog http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden



Steve Holden
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help on Modelsim VHDL syntax? ASAP:) kaji General Help Related Topics 0 03-14-2007 10:43 PM
Need help on a Modelsim VHDL Syntax? ASAP:) kaji Software 0 03-14-2007 10:43 PM
Need Help on a Modelsim VHDL Syntax....ASAP:) kaji Hardware 0 03-14-2007 10:41 PM
Parser Error Message: Could not load type 'Microsoft.SharePoint.ApplicationPages.Glob rasmita General Help Related Topics 0 09-05-2006 05:49 AM
Parser Error Message: Could not load type 'Microsoft.SharePoint.ApplicationPages.Glob rasmita General Help Related Topics 0 09-05-2006 05:46 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46