I have always found that IE _does_ respect the Content-type header and have relied on this behavior in production applications.
What is your web server? Do you see different behavior on NS? I'd double check that there isn't a conflict in your web server configs somewhere. I.e. are you forcing the MIME type to text/plain or text/html when configuring the directory (or URL) for CGI execution? Also, if you go down the mod_rewrite path, you can simplify things a bit. It may be counter intuitive, but URLs that look like static files can accept arguments. E.g. http://www.domain.com/xmlfiles/text.xml?foo=3343234&bar=123345354 take it easy, Charlie At 10:32 AM 2/26/2002 -0500, Ranga Nathan wrote: >[forwarded submission from a non-member address -- rjk] > > >From: "Ranga Nathan" <[EMAIL PROTECTED]> >Date: Mon, 25 Feb 2002 19:01:38 -0800 >Subject: CGI printing XML >To: <[EMAIL PROTECTED]> > >When a CGI scripts prints an XML file to IE, it renders it as plain >text!!! But when it GETs an XML file with the xml extension it renders it >with collapse/expand view. Wonder if anyone has an angle on this. How can >one tell IE from a CGI to collaps/expand? I tried different mime types.. >IE simply seems to ignore it!!! >script is: >#!/usr/local/bin/perl > >print <<HERE; >Content-type: text/xml > ><?xml version="1.0" ?> ><root> > <elem> > This is element one > </elem> > <elem> > This is element two > </elem> ></root> >HERE >==================================== >Ranga Nathan >Reliance Technology >Legacy to Web integration consultancy >Text to web-database-spreadsheet, datamarts >ADABAS, NATURAL, Perl, Apache, Linux, Wintel solutions >Tel: 617 884 9801 Fax: 781 623 5646 >http://www.cobolexplorer.com - cobol listings on the web >http://www.any2xml.com - text to anything >http://www.goreliance.com >http://www.adaexplorer.com - ADAREP on the web + stats
