summaryrefslogtreecommitdiffstats
path: root/test/webrick/webrick.cgi
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-05-27 17:16:06 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-05-27 17:16:06 +0000
commit09174ffe8d09fb4356801ffcc24e389ad2288ac6 (patch)
tree340e1a392e88bfef5e98f0330ceb54e4915c3382 /test/webrick/webrick.cgi
parent04b2e86dbcc9c5dc042dc675f3065410dd53870a (diff)
downloadruby-09174ffe8d09fb4356801ffcc24e389ad2288ac6.tar.gz
ruby-09174ffe8d09fb4356801ffcc24e389ad2288ac6.tar.xz
ruby-09174ffe8d09fb4356801ffcc24e389ad2288ac6.zip
* lib/webrick/cgi.rb (WEBrick::CGI::Socket#request_line):
ENV["REQUEST_URI"] is better to get correct Request-URI than ENV["SCRIPT_NAME"] + ENV["PATH_INFO"]. [ruby-dev:26235] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/webrick/webrick.cgi')
-rw-r--r--test/webrick/webrick.cgi4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/webrick/webrick.cgi b/test/webrick/webrick.cgi
index ac525fb07..9edbb1384 100644
--- a/test/webrick/webrick.cgi
+++ b/test/webrick/webrick.cgi
@@ -12,6 +12,10 @@ class TestApp < WEBrick::CGI
"#{key}=#{v}"
}.join(", ")
}.join(", ")
+ elsif %r{/$} =~ req.request_uri.to_s
+ res.body = ""
+ res.body << req.request_uri.to_s << "\n"
+ res.body << req.script_name
else
res.body = req.script_name
end