summaryrefslogtreecommitdiff
path: root/lib/webrick/cgi.rb
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-01-10 06:29:58 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-01-10 06:29:58 +0000
commita9a02401a849958b5d654cf60d4cda927c7e33b4 (patch)
tree77b4df3270c46d4eca271d09181e303b3da464d5 /lib/webrick/cgi.rb
parentc744d6f62dcb536e58ded4a79eec1987880bc23c (diff)
* lib/webrick/cgi.rb (WEBrick::CGI::Socket#request_line): should
escape SCRIPT_NAME and PATH_INFO before being parsed as a URI. * lib/webrick/httputils.rb (WEBrick::HTTPUtils#escape_path): add new method to escape URI path component. * lib/webrick/ssl.rb (WEBrick::Config::SSL): the default value of :SSLEnable is false. * test/webrick/{test_cgi.rb,webrick.cgi}: new file. * test/webrick/utils.rb: require "webrick/https.h". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/webrick/cgi.rb')
-rw-r--r--lib/webrick/cgi.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/webrick/cgi.rb b/lib/webrick/cgi.rb
index 1282bdcd93..6878da5749 100644
--- a/lib/webrick/cgi.rb
+++ b/lib/webrick/cgi.rb
@@ -147,6 +147,7 @@ module WEBrick
if path_info = @env["PATH_INFO"]
url << path_info
end
+ url = WEBrick::HTTPUtils.escape_path(url)
if query_string = @env["QUERY_STRING"]
unless query_string.empty?
url << "?" << query_string