Gossamer Forum
Home : General : Perl Programming :

Content-type: ???

Quote Reply
Content-type: ???
I have a cgi script which I use on my web site that prints out some html that's updated allot. Part of that HTML is a SSI but because it's cgi generated it doesn't work. Can I put like Content-type: text/shtml or something and have it execute the SSI, Just like if it was a .shtml file?


Thanks,
Steven Bond
Quote Reply
Re: Content-type: ??? In reply to
Nope, you can't include SSI in CGI output, the server doesn't parse the output.

Cheers,

Alex
Quote Reply
Re: Content-type: ??? In reply to
Alex

I just saw someone on UBB Forum saying it's possible to do that.

Quote:
If you change the line in a CGI script that reads
Content-type: text/html\n\n
to
Content-type: text/x-server-parsed-html\n
any SSI request such as <!--#exec cgi="/AdPro/cgi-bin/ssirand.cgi"--> will be implimented.

URL: www.scriptkeeper.com/ubb/Forum14/HTML/000584.html


---------
Update: I just tested it in my server and it doesn't seen to work.

------------------
Rogerio Morais
www.rogerle.com


[This message has been edited by Roger (edited August 12, 1999).]
Quote Reply
Re: Content-type: ??? In reply to
WOW... That's news to me. I have my doubts that you can simply change the Content-Type type header and make httpd parse it.

I don't claim to be an html genius by any stretch of the imagination, but as I understand it, that is used by the browser to determine what to do with the content. Why would the httpd server even pay attention to the contents of what it's spewing back at the browser?

Anywho.... I am definetly gonna try this when I get home tonight. This could save me a world of problems if it actually works. Keep your fingers crossed.

Daniel Alexander