Report abuse


			
  # set the charset
  def set_content_type
  
 
  
    # Always return text/html for the engines.
    if self.controller_name == 'role' || self.controller_name == 'user'
      @headers["Content-Type" ] = "text/html;charset=utf-8;"
      return true
    else # If the current controller isn't an engine, see if we can serve it proper XHTML/XML:
      if (@request.env['HTTP_ACCEPT'].match(/application\/xhtml\+xml/))
        @headers["Content-Type" ] = "application/xhtml+xml;charset=utf-8;";
      else
        @headers["Content-Type" ] = "text/html;charset=utf-8;"
      end
    end
    
    
    return true
  end