Use msvcrt.setmode(1, os.O_BINARY)
(after you write the headers and sys.stdout.flush
them) to set standard output to binary mode -- poor Apache is innocent, it's a Windows thing;-).
Alex Martelli
2009-12-29 04:17:01