in reply to Content-type: html and images ?
Each HTTP transaction (i.e. each call to your program) can only return one set of HTTP headers. Therefore it can only return one type of data. You would need to return an HTML page and where you want the image to appear, put an <img> tag where the source is to another (or maybe the same) CGI program which will return the image.
Your code prints two "Content-type" headers. This can potentially present a problem to browsers as the second one will be interpreted as data. Also you should look at using CGI.pm to print your content-type headers as it will always do the right thing with end of line characters. Your two headers neatly illustrate that there is scope for confusion there.
--"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
|
---|