private Method

DispatchServlet.set_charset(header)

There's no documentation for this item.

Source Code

# File webrick_server.rb, line 152
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
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.