mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@8531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
aee4253e70
commit
2530fa50e9
4 changed files with 24 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue