Delivering dynamic content using cgi module
sholden at bellatlantic.net
Thu Mar 9 17:18:36 CET 2000
Niels Diepeveen wrote:
> 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
Eek! Note, though, that the usual action of a user agent is to offer
the embedded content as icons rather than to render them inline. It
would be difficult, though not impossible I suppose, to have multipart
content with dribs of HTML around graphics, but then there would be no
way of supplying the correct attributes to render the graphic.
Thanks very much for pointing this out.
"If computing ever stops being fun, I'll stop doing it"
More information about the Python-list