question about python

Carl Banks pavlovevidence at
Sat Sep 13 10:25:55 CEST 2008

On Sep 13, 1:00 am, fishfin <calebjhan... at> wrote:
> @ Carl: Yes, I think your right now that I look at it (or at least all
> except for the last two lines need to be indented). I'm still not sure
> how to send the stuff to the web browser though. Thanks for pointing
> it out!

Try reading in the whole HTTP request instead of just the first line.

line = cfile.readline().strip()


line =

And see if that helps.  (Outputting the document so that it formats
the request well is left as an exercise.  Also, as a heads up: in real
programs you should never output anything you receive through the
network without checking it or escaping it to prevent malicious uses.)

Carl Banks

More information about the Python-list mailing list