Sending binary data over CGI

Peter Otten __peter__ at
Thu Mar 4 08:55:54 CET 2004

Walter Huf wrote:

> However, if I try to send binary data, like jpgs, through cgi, the data
> gets corrupted in a very small manner. Whenever my program sends the
> character 10, it gets converted to character 13+character 10. I found out
> this only happens when I send data to stdout. If I send the data to a
> standard file object, it works fine. However, with the stdout, the problem
> arises.

Have you tried Searching for "stdout binary"
should suffice. For now:


More information about the Python-list mailing list