diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-05 06:27:43 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-05 06:27:43 +0000 |
commit | 2c59dd61f1034b06ae20351c14404008e17c6f5d () | |
tree | 6037d605ec10ff4b2ae41bcca9846d7e84bc99a3 /lib | |
parent | 6899d6a98c922dca7c7d70a3d6eaa56799998aed (diff) |
un.rb: support https
* lib/un.rb: add https support. based on the by Flavio Castelli <[email protected]> in [ruby-core:81901]. [Feature #13714] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | lib/un.rb | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -313,18 +313,29 @@ end # --do-not-reverse-lookup disable reverse lookup # --request-timeout=SECOND request timeout in seconds # --http-version=VERSION HTTP version # -v verbose # def httpd setup("", "BindAddress=ADDR", "Port=PORT", "MaxClients=NUM", "TempDir=DIR", - "DoNotReverseLookup", "RequestTimeout=SECOND", "HTTPVersion=VERSION") do |argv, options| require 'webrick' opt = options[:RequestTimeout] and options[:RequestTimeout] = opt.to_i [:Port, :MaxClients].each do |name| opt = options[name] and (options[name] = Integer(opt)) rescue nil end options[:Port] ||= 8080 # HTTP Alternate options[:DocumentRoot] = argv.shift || '.' s = WEBrick::HTTPServer.new(options) |