Delivering dynamic content using cgi module

Niels Diepeveen niels at endea.demon.nl
Thu Mar 9 10:01:04 EST 2000


Steve Holden schreef:
> 
> This problem seems to need a more precise specification.  Do you
> want a single CGI program to be able to return *either* HTML text, a
> GIF or a JPEG image?  Or do you want to return all three in a
> single HTTP response?
> 
> If the latter, this seems doomed to failure (IMHO: there may be
> things I am not considering here).  Normally a single document
> will have a single Content-Type.

That's what I would think too, but just for a laugh, I looked it up. The
HTTP 1.1 specification says:
   In general, an HTTP user agent SHOULD follow the same or similar
   behavior as a MIME user agent would upon receipt of a multipart type.
   If an application receives an unrecognized multipart subtype, the
   application MUST treat it as being equivalent to "multipart/mixed".

I can't remember seeing anyone use this though. I wonder if browsers
generally implement it.

-- 
Niels Diepeveen
Endea automatisering




More information about the Python-list mailing list