method
set_charset
Ruby on Rails latest stable (v6.1.7.7)
-
0 notes -
Class: DispatchServlet
set_charset(header)
private
Hide source
# File railties/lib/webrick_server.rb, line 142 def set_charset(header) ct = header["content-type"] if ct.any? { |x| x =~ /^text\// } && ! ct.any? { |x| x =~ /charset=/ } ch = @server_options[:charset] || "UTF-8" ct.find { |x| x =~ /^text\// } << ("; charset=" + ch) end end