corrupted GIF through CGI

Seung Chan Lim info at djslim.com
Wed May 7 02:46:50 EDT 2003


> > print """Content-Type: image/gif
> > Content-Length: %d
> > """%(len(buf))
> > print buf
>
> At the very least you are corrupting the GIF by an extra EOL character.
> Try:
>
> sys.stdout.write(buf)

actually, no... the content-length header takes care of that extra EOL
character. ;)

Thanks Skip, that URL is exactly what I needed

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65443

slim







More information about the Python-list mailing list