instance method
set_charset
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v2.3.18 PrivateAvailable in: v2.2.3 v2.3.18
Signature
set_charset(header)
No documentation comment.
Parameters
-
headerreq
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
Defined in railties/lib/webrick_server.rb line 142
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in DispatchServlet