Skip to content

Commit

Permalink
Revert "JRUBY-5007: add 'charset' parameter to mediatype of WEBrick h…
Browse files Browse the repository at this point in the history
…ttp server's default error page."

This reverts commit dfb3136.
CRuby's release manager decided to apply the original patch which is
differ from Apple and RedHat published.
http://www.ruby-lang.org/en/news/2010/08/16/xss-in-webrick-cve-2010-0541/
I'll revert this and apply the following fix by CRuby development team.
ftp://ftp.ruby-lang.org/pub/misc/webrick-cve-2010-0541.diff
  • Loading branch information
Hiroshi Nakamura committed Aug 16, 2010
1 parent 39d3e56 commit 9ad469f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/ruby/1.8/webrick/httpresponse.rb
Expand Up @@ -209,7 +209,7 @@ def set_error(ex, backtrace=false)
@keep_alive = false
self.status = HTTPStatus::RC_INTERNAL_SERVER_ERROR
end
@header['content-type'] = "text/html; charset=utf-8"
@header['content-type'] = "text/html"

if respond_to?(:create_error_page)
create_error_page()
Expand Down
2 changes: 1 addition & 1 deletion lib/ruby/1.9/webrick/httpresponse.rb
Expand Up @@ -208,7 +208,7 @@ def set_error(ex, backtrace=false)
@keep_alive = false
self.status = HTTPStatus::RC_INTERNAL_SERVER_ERROR
end
@header['content-type'] = "text/html; charset=utf-8"
@header['content-type'] = "text/html"

if respond_to?(:create_error_page)
create_error_page()
Expand Down

0 comments on commit 9ad469f

Please sign in to comment.