summaryrefslogtreecommitdiffstats
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
commit184af94a44abe3cdbb58866d0878f7f246a990a2 (patch)
tree493ad44e70e0212e156cb623d45c43651a8d2e03
parent453f5e44c37fa304e6b77e38c86b2ec3c618347c (diff)
downloadruby-184af94a44abe3cdbb58866d0878f7f246a990a2.tar.gz
ruby-184af94a44abe3cdbb58866d0878f7f246a990a2.tar.xz
ruby-184af94a44abe3cdbb58866d0878f7f246a990a2.zip
* 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
-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 b2d3ef804..5853d7bad 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 11:38:40 2005 Kazuo Saito <ksaito@uranus.dti.ne.jp>
* regparse.c (type_cclass_hash): (Thanks Nobu) fixed
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