class WEBrick::HTTPResponse
def error_body(backtrace, ex, host, port)
def error_body(backtrace, ex, host, port) @body = +"" @body << <<-_end_of_html_ CTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> L> EAD><TITLE>#{HTMLUtils::escape(@reason_phrase)}</TITLE></HEAD> ODY> <H1>#{HTMLUtils::escape(@reason_phrase)}</H1> #{HTMLUtils::escape(ex.message)} <HR> _end_of_html_ if backtrace && $DEBUG @body << "backtrace of '#{HTMLUtils::escape(ex.class.to_s)}' " @body << "#{HTMLUtils::escape(ex.message)}" @body << "<PRE>" ex.backtrace.each{|line| @body << "\t#{line}\n"} @body << "</PRE><HR>" end @body << <<-_end_of_html_ <ADDRESS> #{HTMLUtils::escape(@config[:ServerSoftware])} at #{host}:#{port} </ADDRESS> BODY> ML> _end_of_html_ end