summaryrefslogtreecommitdiff
path: root/lib/webrick
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-13 08:00:35 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-13 08:00:35 +0000
commit9c560ca864c7cfb2d7d78fea6b2970cb7fefab8f (patch)
tree493ad44e70e0212e156cb623d45c43651a8d2e03 /lib/webrick
parent08e340fb75e05da908154e5ae97d6618849a73b4 (diff)
* lib/webrick/cgi.rb (WEBrick::CGI.start): should set reason-phrase
to the value of status header field. ([ruby-dev:40617]) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/webrick')
-rw-r--r--lib/webrick/cgi.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/webrick/cgi.rb b/lib/webrick/cgi.rb
index 6878da5749..eb99dab523 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