Security: Update to Rails 2.3.14
This commit is contained in:
parent
3c650f2cf6
commit
4b2448b09a
26 changed files with 106 additions and 33 deletions
|
@ -64,12 +64,13 @@ module ActionController # :nodoc:
|
|||
# the character set information will also be included in the content type
|
||||
# information.
|
||||
def content_type=(mime_type)
|
||||
self.headers["Content-Type"] =
|
||||
new_content_type =
|
||||
if mime_type =~ /charset/ || (c = charset).nil?
|
||||
mime_type.to_s
|
||||
else
|
||||
"#{mime_type}; charset=#{c}"
|
||||
end
|
||||
self.headers["Content-Type"] = URI.escape(new_content_type, "\r\n")
|
||||
end
|
||||
|
||||
# Returns the response's content MIME type, or nil if content type has been set.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue