Τη Πέμπτη, 6 Ιουνίου 2013 12:18:39 π.μ. UTC+3, ο χρήστης ru...@yahoo.com έγραψε:
> On Wednesday, June 5, 2013 3:03:29 PM UTC-6, Chris Angelico wrote:
> 
> > On Thu, Jun 6, 2013 at 6:56 AM,  <ru...@yahoo.com> wrote:
> 
> > > On Wednesday, June 5, 2013 1:54:45 PM UTC-6, Νικόλαος Κούρας wrote:
> 
> > >>...
> 
> > >> print( cookie, "Content-type: text/html; charset=utf-8\n", message ) 
> 
> > >>...
> 
> > >   print( cookie, "Content-type: text/html; charset=utf-8\n\n", message )
> 
> > > (ie, note the two \n's after the "utf-8" test.)
> 
> > 
> 
> > But that won't solve it either. The default separator for print is a
> 
> > space, so this will indent his Content-type line by one space.
> 
> 
> 
> Ah, quite right.  Something like 
> 
> 
> 
>   print( cookie, "\nContent-type: text/html; charset=utf-8\n\n", message )
> 
> 
> 
> then.


print( cookie, "\nContent-type: text/html; charset=utf-8\n\n", message )

or by trying:

print( cookie + "\nContent-type: text/html; charset=utf-8\n\n" + message )

the output is for both:

ni...@superhost.gr [~]# tail -F /usr/local/apache/logs/error_log &

ni...@superhost.gr [~]# [Thu Jun 06 06:20:11 2013] [error] [client 
79.103.41.173] (2)No such file or directory: exec of 
'/home/nikos/public_html/cgi-bin/koukos.py' failed
[Thu Jun 06 06:20:11 2013] [error] [client 79.103.41.173] Premature end of 
script headers: koukos.py
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to