[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

eruby: content-type is text/plain

Tobias Vogele

10/18/2003 3:32:00 PM

Hi,

I habe found some eruby-scripts and wanted to test them. So i installed
mod_ruby and eruby and the scripts work. But there is one annoying thing:
The Content-type is by default text/plain.

The scripts don't contain any information about about the content-type, and
when I insert the command 'Apache.request.content_type="text/html"', then
the content-type is correctly set to text/html.
But i don't want to insert this line in every script, if it is not
necessary, and I assume, it should work also without this line, because
otherwise the author would have surely written this line in his scripts.

So i tried some things and found out, that the content-type is correctly set
to text/html, if I use a reay ruby-script with mod_ruby (instead of ruby
embedded in html with eruby). It's also text/html, when i run
`eruby -Mc file.rhtml` (or with -Mn) on the commandline, but not when
calling it with "-Mf" or without any -M..-switch.

I use the versions ruby 1.6.8, eruby 1.0.4, mod_ruby 1.0.7 and apache
1.3.27.

Does anybody know, how i can set the default-content-type to text/html?

bye,

tobi