Wrong Content-type in RJS with Gettext



I am developing an application using Rails and doing l10n with
When I deploy the app on lighttpd, every rjs template is rendered with
Content-type: text/html; charset: UTF-8. I believe it comes from 85th
line of
rails.rb script in ruby-gettext lib. RJS templates are not executed in
this situation.

Hovewer, when I run the app with Webrick, rjs templates are rendered
with: text/javascript; charset: UTF-8 (which is ok).

This strange difference in behaviour (Webrick vs. Lighty) of my app
occurs only when I use gettext. When I turn gettext off everything works
ok; rjs templates
are rendered on both servers with proper Content-type.

I reproduced this behaviour on a blank test app so it doesn’t depends
on my code.

I use EdgeRails (rev:4380), lighty: 1.4.11, gettext gem 1.5.0.

Can you tell me what’s wrong here?

Best regards,

Jacek Becela



Could you send me your “blank test app” and
tell me how to set up lighttpd ?

I don’t know lighttpd well.

On Tue, 30 May 2006 14:42:58 +0200



I setup lighttpd and test his sample application
but it works correctly.

It returns “Content-Type: text/javascript; charset=UTF-8”.

If someone have same trouble, report it to me, please.

On Tue, 30 May 2006 22:26:06 +0900