removing the charset in Content-Type

How are you setting the content-type? In the two ways I tried, mongrel never added the charset...

1) Setting headers['Content-Type'] in the rails action.

$ cat app/controllers/test_controller.rb class TestController < ApplicationController   def test     headers['Content-Type'] = 'audio/x-scpls'     render :text => 'hi', :layout => false   end end $ lwp-request -d -e http://localhost:3000/test ... Content-Type: audio/x-scpls ...

2) Serving a file and having DirHandler serve the file, and using DirHandler.add_mime_type to return the right mime-type.

$ cat config/mongrel.conf DirHandler.add_mime_type '.pls', 'audio/x-scpls' $ lwp-request -e http://localhost:3000/test.pls ... Content-Type: audio/x-scpls ...

Sounds like you've nicked it. Just one last thing... it looks like Rails 1.2.x is adding the charset= bit, mongrel isn't. When I tested it I was using 1.1.6. Trying the same thing in 1.2.3 shows the charset= in the response headers.