Up Prev Next
From: Ron Watkins <ron at argus dot lpl dot arizona dot edu>
Subject: Re: GIF - straight to the browser
Date: Sep 10 1997 4:38AM
This is no problem. The correct way is to place a blank line between the
content type and the image content. The blank line is a break between the
header and body sections of the data stream sent to the browser. For
example, you can send cookie information in the header section allong
with the content-type (mime header).
I have implemented a C routine using CT-lib which reads GIF/JPEG images
stored in the database and returns them from a CGI. My main HTML file
looks like this:
The display.cgi is exectued using primary key 1234 to retireve an image
from the database then send the mime-header (which is also in the
database) followed by a blank-line then the image content as a bit stream.