puma 2.16.0 → 3.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/{History.txt → History.md} +489 -70
- data/README.md +143 -174
- data/docs/architecture.md +36 -0
- data/{DEPLOYMENT.md → docs/deployment.md} +1 -1
- data/docs/images/puma-connection-flow-no-reactor.png +0 -0
- data/docs/images/puma-connection-flow.png +0 -0
- data/docs/images/puma-general-arch.png +0 -0
- data/docs/nginx.md +2 -2
- data/docs/plugins.md +28 -0
- data/docs/restart.md +39 -0
- data/docs/signals.md +56 -3
- data/docs/systemd.md +272 -0
- data/ext/puma_http11/extconf.rb +2 -0
- data/ext/puma_http11/http11_parser.c +291 -447
- data/ext/puma_http11/http11_parser.h +1 -0
- data/ext/puma_http11/http11_parser.java.rl +5 -5
- data/ext/puma_http11/http11_parser.rl +10 -9
- data/ext/puma_http11/http11_parser_common.rl +1 -1
- data/ext/puma_http11/io_buffer.c +8 -8
- data/ext/puma_http11/mini_ssl.c +64 -6
- data/ext/puma_http11/org/jruby/puma/Http11Parser.java +113 -131
- data/ext/puma_http11/org/jruby/puma/MiniSSL.java +9 -2
- data/ext/puma_http11/puma_http11.c +1 -0
- data/lib/puma/app/status.rb +9 -1
- data/lib/puma/binder.rb +90 -38
- data/lib/puma/cli.rb +134 -491
- data/lib/puma/client.rb +142 -4
- data/lib/puma/cluster.rb +132 -76
- data/lib/puma/commonlogger.rb +19 -20
- data/lib/puma/compat.rb +3 -7
- data/lib/puma/configuration.rb +206 -67
- data/lib/puma/const.rb +21 -31
- data/lib/puma/control_cli.rb +92 -103
- data/lib/puma/convenient.rb +23 -0
- data/lib/puma/daemon_ext.rb +6 -0
- data/lib/puma/detect.rb +10 -1
- data/lib/puma/dsl.rb +203 -45
- data/lib/puma/events.rb +22 -13
- data/lib/puma/io_buffer.rb +1 -1
- data/lib/puma/jruby_restart.rb +1 -2
- data/lib/puma/launcher.rb +431 -0
- data/lib/puma/minissl.rb +83 -4
- data/lib/puma/null_io.rb +19 -11
- data/lib/puma/plugin/tmp_restart.rb +34 -0
- data/lib/puma/plugin.rb +115 -0
- data/lib/puma/rack/backports/uri/common_193.rb +17 -13
- data/lib/puma/rack/builder.rb +3 -0
- data/lib/puma/rack/urlmap.rb +9 -8
- data/lib/puma/reactor.rb +18 -0
- data/lib/puma/runner.rb +43 -15
- data/lib/puma/server.rb +141 -35
- data/lib/puma/single.rb +16 -6
- data/lib/puma/state_file.rb +29 -0
- data/lib/puma/tcp_logger.rb +8 -1
- data/lib/puma/thread_pool.rb +60 -10
- data/lib/puma/util.rb +1 -5
- data/lib/puma.rb +13 -4
- data/lib/rack/handler/puma.rb +76 -29
- data/tools/jungle/README.md +12 -2
- data/tools/jungle/init.d/README.md +9 -2
- data/tools/jungle/init.d/puma +86 -59
- data/tools/jungle/init.d/run-puma +16 -1
- data/tools/jungle/rc.d/README.md +74 -0
- data/tools/jungle/rc.d/puma +61 -0
- data/tools/jungle/rc.d/puma.conf +10 -0
- data/tools/jungle/upstart/puma.conf +1 -1
- data/tools/trickletest.rb +1 -1
- metadata +28 -95
- data/COPYING +0 -55
- data/Gemfile +0 -13
- data/Manifest.txt +0 -74
- data/Rakefile +0 -158
- data/docs/config.md +0 -0
- data/lib/puma/capistrano.rb +0 -94
- data/lib/puma/rack/backports/uri/common_18.rb +0 -56
- data/lib/puma/rack/backports/uri/common_192.rb +0 -52
- data/puma.gemspec +0 -52
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# :stopdoc:
|
|
2
|
-
|
|
3
|
-
# Stolen from ruby core's uri/common.rb @32618ba to fix DoS issues in 1.9.2
|
|
4
|
-
#
|
|
5
|
-
# https://github.com/ruby/ruby/blob/32618ba7438a2247042bba9b5d85b5d49070f5e5/lib/uri/common.rb
|
|
6
|
-
#
|
|
7
|
-
# Issue:
|
|
8
|
-
# http://redmine.ruby-lang.org/issues/5149
|
|
9
|
-
#
|
|
10
|
-
# Relevant Fixes:
|
|
11
|
-
# https://github.com/ruby/ruby/commit/b5f91deee04aa6ccbe07c23c8222b937c22a799b
|
|
12
|
-
# https://github.com/ruby/ruby/commit/93177c1e5c3906abf14472ae0b905d8b5c72ce1b
|
|
13
|
-
#
|
|
14
|
-
# This should probably be removed once there is a Ruby 1.9.2 patch level that
|
|
15
|
-
# includes this fix.
|
|
16
|
-
|
|
17
|
-
require 'uri/common'
|
|
18
|
-
|
|
19
|
-
module URI
|
|
20
|
-
TBLDECWWWCOMP_ = {} unless const_defined?(:TBLDECWWWCOMP_) #:nodoc:
|
|
21
|
-
if TBLDECWWWCOMP_.empty?
|
|
22
|
-
256.times do |i|
|
|
23
|
-
h, l = i>>4, i&15
|
|
24
|
-
TBLDECWWWCOMP_['%%%X%X' % [h, l]] = i.chr
|
|
25
|
-
TBLDECWWWCOMP_['%%%x%X' % [h, l]] = i.chr
|
|
26
|
-
TBLDECWWWCOMP_['%%%X%x' % [h, l]] = i.chr
|
|
27
|
-
TBLDECWWWCOMP_['%%%x%x' % [h, l]] = i.chr
|
|
28
|
-
end
|
|
29
|
-
TBLDECWWWCOMP_['+'] = ' '
|
|
30
|
-
TBLDECWWWCOMP_.freeze
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
def self.decode_www_form(str, enc=Encoding::UTF_8)
|
|
34
|
-
return [] if str.empty?
|
|
35
|
-
unless /\A#{WFKV_}=#{WFKV_}(?:[;&]#{WFKV_}=#{WFKV_})*\z/o =~ str
|
|
36
|
-
raise ArgumentError, "invalid data of application/x-www-form-urlencoded (#{str})"
|
|
37
|
-
end
|
|
38
|
-
ary = []
|
|
39
|
-
$&.scan(/([^=;&]+)=([^;&]*)/) do
|
|
40
|
-
ary << [decode_www_form_component($1, enc), decode_www_form_component($2, enc)]
|
|
41
|
-
end
|
|
42
|
-
ary
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
def self.decode_www_form_component(str, enc=Encoding::UTF_8)
|
|
46
|
-
raise ArgumentError, "invalid %-encoding (#{str})" unless /\A[^%]*(?:%\h\h[^%]*)*\z/ =~ str
|
|
47
|
-
str.gsub(/\+|%\h\h/, TBLDECWWWCOMP_).force_encoding(enc)
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
remove_const :WFKV_ if const_defined?(:WFKV_)
|
|
51
|
-
WFKV_ = '(?:[^%#=;&]*(?:%\h\h[^%#=;&]*)*)' # :nodoc:
|
|
52
|
-
end
|
data/puma.gemspec
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
|
2
|
-
|
|
3
|
-
# This is only used when puma is a git dep from Bundler, so it's a little
|
|
4
|
-
# weird.
|
|
5
|
-
|
|
6
|
-
d = File.read(File.expand_path("../lib/puma/const.rb", __FILE__))
|
|
7
|
-
if d =~ /VERSION = "(\d+\.\d+\.\d+)"/
|
|
8
|
-
version = $1
|
|
9
|
-
else
|
|
10
|
-
version = "0.0.1"
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
Gem::Specification.new do |s|
|
|
14
|
-
s.name = "puma"
|
|
15
|
-
s.version = version
|
|
16
|
-
|
|
17
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
18
|
-
s.authors = ["Evan Phoenix"]
|
|
19
|
-
s.date = `git log --pretty="%ai" -n 1`.split(" ").first
|
|
20
|
-
s.description = "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rack applications. Puma is intended for use in both development and production environments. In order to get the best throughput, it is highly recommended that you use a Ruby implementation with real threads like Rubinius or JRuby."
|
|
21
|
-
s.email = ["evan@phx.io"]
|
|
22
|
-
s.executables = ["puma", "pumactl"]
|
|
23
|
-
s.extensions = ["ext/puma_http11/extconf.rb"]
|
|
24
|
-
s.files = `git ls-files`.split($/)
|
|
25
|
-
s.homepage = "http://puma.io"
|
|
26
|
-
s.license = "BSD-3-Clause"
|
|
27
|
-
s.rdoc_options = ["--main", "README.md"]
|
|
28
|
-
s.require_paths = ["lib"]
|
|
29
|
-
s.required_ruby_version = Gem::Requirement.new(">= 1.8.7")
|
|
30
|
-
s.rubyforge_project = "puma"
|
|
31
|
-
s.rubygems_version = "1.8.25"
|
|
32
|
-
s.summary = "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rack applications"
|
|
33
|
-
s.test_files = s.files.grep(/^test/)
|
|
34
|
-
|
|
35
|
-
if s.respond_to? :specification_version then
|
|
36
|
-
s.specification_version = 3
|
|
37
|
-
|
|
38
|
-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
|
39
|
-
s.add_development_dependency(%q<rdoc>, ["~> 4.0"])
|
|
40
|
-
s.add_development_dependency(%q<rake-compiler>, ["~> 0.8.0"])
|
|
41
|
-
s.add_development_dependency(%q<hoe>, ["~> 3.6"])
|
|
42
|
-
else
|
|
43
|
-
s.add_dependency(%q<rdoc>, ["~> 4.0"])
|
|
44
|
-
s.add_dependency(%q<rake-compiler>, ["~> 0.8.0"])
|
|
45
|
-
s.add_dependency(%q<hoe>, ["~> 3.6"])
|
|
46
|
-
end
|
|
47
|
-
else
|
|
48
|
-
s.add_dependency(%q<rdoc>, ["~> 4.0"])
|
|
49
|
-
s.add_dependency(%q<rake-compiler>, ["~> 0.8.0"])
|
|
50
|
-
s.add_dependency(%q<hoe>, ["~> 3.6"])
|
|
51
|
-
end
|
|
52
|
-
end
|