content type headers
[email protected] ("Dermot Paikkos") Wed, 1 Jul 2009 15:50:38 +0100
| Newsgroups | perl.beginners.cgi |
|---|---|
| Message-ID | <L71B3674696BA403aBE1033C3212A955B.1246459832.earth.sciencephoto.co.uk@MHS> |
Hi, I've got some old code to deal with and I have hit a problem. If there is a request for a page that has mixed content EG: 'text/html' and 'image/jpeg', the image media is not being displayed correctly under the FireFox browser. The way things currently work is that media other than text/html is output from a separate page, so you might have a bit of html that for an image that looks like this: <img src="/images/showImage.html?imageid=123456" alt="" /> Within showImage.html you have a 1) a piece of code that supposedly sets the content_type to image/jpeg, and 2) calls to a function that literally prints the image based on is CGI param 'imageid'. In my experiments, IE is correctly identifying the media and Firefox is not. However I think FF is expecting the content_type to be sent with the media and IE is guess* based upon the media it receives. So my question, initially, is can a request set the content_type more than once? Thanx, Dp.