From 184af94a44abe3cdbb58866d0878f7f246a990a2 Mon Sep 17 00:00:00 2001 From: gotoyuzo Date: Sun, 13 Feb 2005 08:00:35 +0000 Subject: * lib/webrick/cgi.rb (WEBrick::CGI.start): should set reason-phrase to the value of status header field. ([ruby-dev:40617]) git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/webrick/cgi.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/webrick/cgi.rb b/lib/webrick/cgi.rb index 6878da574..eb99dab52 100644 --- a/lib/webrick/cgi.rb +++ b/lib/webrick/cgi.rb @@ -45,7 +45,10 @@ module WEBrick res = HTTPResponse.new(@config) unless @config[:NPH] or defined?(MOD_RUBY) def res.setup_header - @header["status"] ||= @status + unless @header["status"] + phrase = HTTPStatus::reason_phrase(@status) + @header["status"] = "#{@status} #{phrase}" + end super end def res.status_line -- cgit