diff options
| author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-05-27 17:16:06 +0000 |
|---|---|---|
| committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-05-27 17:16:06 +0000 |
| commit | 09174ffe8d09fb4356801ffcc24e389ad2288ac6 (patch) | |
| tree | 340e1a392e88bfef5e98f0330ceb54e4915c3382 /lib/webrick | |
| parent | 04b2e86dbcc9c5dc042dc675f3065410dd53870a (diff) | |
| download | ruby-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 'lib/webrick')
| -rw-r--r-- | lib/webrick/cgi.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/webrick/cgi.rb b/lib/webrick/cgi.rb index cab237ab0..21ffb7b89 100644 --- a/lib/webrick/cgi.rb +++ b/lib/webrick/cgi.rb @@ -150,15 +150,17 @@ module WEBrick meth = @env["REQUEST_METHOD"] || "GET" url = (@env["SCRIPT_NAME"] || File.expand_path($0)).dup url << @env["PATH_INFO"].to_s - url = WEBrick::HTTPUtils.escape_path(url) - if query_string = @env["QUERY_STRING"] - unless query_string.empty? - url << "?" << query_string + unless url = @env["REQUEST_URI"] + url = WEBrick::HTTPUtils.escape_path(url) + if query_string = @env["QUERY_STRING"] + unless query_string.empty? + url << "?" << query_string + end end end # we cannot get real HTTP version of client ;) httpv = @config[:HTTPVersion] - "#{meth} #{url} HTTP/#{httpv}" + return "#{meth} #{url} HTTP/#{httpv}" end def setup_header |
