Newbie has question that's not exactly Python...

Andrew Dalke dalke at acm.org
Tue Apr 3 21:44:27 EDT 2001


Dave LeBlanc wrote:
>I don't believe that
>"content-type image/gif" is enough! According to the html standard, at
>least <html> is needed to start things off.

No.  Images sent over http are not html, they are images.

Or, to look at it another way.  If your belief is correct, how do
you escape the data in the GIF image (which is binary and could
potentially be almost anything) so it doesn't have a "</body>" or
other HTML which would be interpreted by the browser.

What the person was doing with the sys.stdout.write is the
correct approach.

                    Andrew
                    dalke at acm.org







More information about the Python-list mailing list