diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/webrick/cgi.rb | 5 |
2 files changed, 9 insertions, 1 deletions
@@ -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 |