1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/webrick/httpresponse.rb: Move error_body to method. It allow to

override the body more easily. [fix GH-1307]
* test/webrick/test_httpresponse.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2016-03-29 03:45:32 +00:00
parent 7504be10ef
commit c2355aefc9
3 changed files with 24 additions and 4 deletions

View file

@ -352,6 +352,14 @@ module WEBrick
host, port = @config[:ServerName], @config[:Port]
end
error_body(backtrace, ex, host, port)
end
private
# :stopdoc:
def error_body(backtrace, ex, host, port)
@body = ''
@body << <<-_end_of_html_
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
@ -381,10 +389,6 @@ module WEBrick
_end_of_html_
end
private
# :stopdoc:
def send_body_io(socket)
begin
if @request_method == "HEAD"