summaryrefslogtreecommitdiff
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
commitf19caf73002a24347cdd43f5287f060596363fbf (patch)
tree8a2d2a863464f80c32e726dacfb94705555cb5f8
parent009400515972382a4dae2c56f42d0947bbbf5752 (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/branches/ruby_1_8@7962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/webrick/cgi.rb5
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 22083e98d4..5414571a45 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Feb 13 16:56:52 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
+
+ * lib/webrick/cgi.rb (WEBrick::CGI.start): should set reason-phrase
+ to the value of status header field. ([ruby-dev:40617])
+
Sun Feb 13 00:52:33 2005 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
* lib/erb.rb (ERB::Util.h, u): make it module_function.
diff --git a/lib/webrick/cgi.rb b/lib/webrick/cgi.rb
index ca81e4b937..77ae443c20 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