diff --git a/index.html b/index.html index e74aeba..d0e6918 100644 --- a/index.html +++ b/index.html @@ -98,7 +98,7 @@
::Process.respond_to? :fork+ # File 'lib/puma/detect.rb', line 9
::Process.respond_to? :fork
const_defined?(:MiniSSL, false) && MiniSSL.const_defined?(:Engine, false)+ # File 'lib/puma.rb', line 26
const_defined?(:MiniSSL, false) && MiniSSL.const_defined?(:Engine, false)
Object.const_defined?(:UNIXSocket) && !IS_WINDOWS+ # File 'lib/puma.rb', line 28
Object.const_defined?(:UNIXSocket) && !IS_WINDOWS
Every standard HTTP code mapped to the appropriate message. Generated with: curl -s www.iana.org/assignments/http-status-codes/http-status-codes-1.csv | \
-ruby -ne 'm = /^(\d{3}),(?!Unassigned|\(Unused\))([^,]+)/.match($_) and \
- puts "#{m[1]} => \x27#{m[2].strip}\x27,"'
+ruby -ne 'm = /^(\d{3}),(?!Unassigned|\(Unused\))([^,]+)/.match($_) and \
+ puts "#{m[1]} => \x27#{m[2].strip}\x27,"'
- # File 'lib/puma/const.rb', line 18 { + # File 'lib/puma/const.rb', line 18{ 100 => 'Continue', 101 => 'Switching Protocols', 102 => 'Processing', @@ -257,7 +257,7 @@Constant Summary
Object.const_defined? :JRUBY_VERSION+ # File 'lib/puma/detect.rb', line 11
Object.const_defined? :JRUBY_VERSION
(RUBY_ENGINE == 'ruby' || RUBY_ENGINE.nil?)+ # File 'lib/puma/detect.rb', line 19
(RUBY_ENGINE == 'ruby' || RUBY_ENGINE.nil?)
RUBY_PLATFORM.include? 'darwin'+ # File 'lib/puma/detect.rb', line 13
RUBY_PLATFORM.include? 'darwin'
!!(RUBY_PLATFORM =~ /mswin|ming|cygwin/) || + # File 'lib/puma/detect.rb', line 15!!(RUBY_PLATFORM =~ /mswin|ming|cygwin/) || IS_JRUBY && RUBY_DESCRIPTION.include?('mswin')
PluginRegistry.new+ # File 'lib/puma/plugin.rb', line 74
PluginRegistry.new
{ + # File 'lib/puma/const.rb', line 84{ 204 => true, 205 => true, 304 => true @@ -454,7 +454,7 @@Class Attribute Details
.abstract_unix_socket? ⇒
- [ GitHub ] + [ GitHub ]Boolean
(readonly)- [ GitHub ] + [ GitHub ]@@ -490,7 +490,7 @@
@@ -523,7 +523,7 @@- [ GitHub ] + [ GitHub ]
@@ -542,7 +542,7 @@
.jruby? ⇒
- [ GitHub ] + [ GitHub ]Boolean
(readonly)@@ -577,7 +577,7 @@- [ GitHub ] + [ GitHub ]
@@ -596,7 +596,7 @@
.osx? ⇒
- [ GitHub ] + [ GitHub ]Boolean
(readonly)@@ -615,7 +615,7 @@
.ssl? ⇒
- [ GitHub ] + [ GitHub ]Boolean
(readonly)@@ -634,7 +634,7 @@
.stats_object=(val) (writeonly)
- [ GitHub ] + [ GitHub ]@@ -653,7 +653,7 @@
.windows? ⇒
- [ GitHub ] + [ GitHub ]Boolean
(readonly)- [ GitHub ] + [ GitHub ]@@ -680,7 +680,7 @@
@@ -700,7 +700,7 @@
.stats
- [ GitHub ] + [ GitHub ]@@ -735,7 +735,7 @@- [ GitHub ] + [ GitHub ]
@@ -771,7 +771,7 @@- [ GitHub ] + [ GitHub ]
@@ -790,7 +790,7 @@
#stats_object (rw)
- [ GitHub ] + [ GitHub ]diff --git a/puma5/Puma/App.html b/puma5/Puma/App.html index ce0ab33..5b20178 100644 --- a/puma5/Puma/App.html +++ b/puma5/Puma/App.html @@ -8,7 +8,7 @@ -Module: Puma::App — Puma-5.6.7 +Module: Puma::App — Puma-5.6.9 @@ -50,7 +50,7 @@[ GitHub ] + [ GitHub ] -@@ -191,7 +191,7 @@Instance Method Details
#authenticate(env) (private)
- [ GitHub ] + [ GitHub ]@@ -214,11 +214,11 @@
- [ GitHub ] + [ GitHub ]-most commands call methods in
+::Puma::Launcher
based on command inenv['PATH_INFO']
most commands call methods in
Launcher
based on command inenv['PATH_INFO']
@@ -291,7 +291,7 @@
#rack_response(status, body, content_type = 'application/json') (private)
- [ GitHub ] + [ GitHub ]diff --git a/puma5/Puma/Binder.html b/puma5/Puma/Binder.html index d0c73b6..3b021f4 100644 --- a/puma5/Puma/Binder.html +++ b/puma5/Puma/Binder.html @@ -8,7 +8,7 @@ -Class: Puma::Binder — Puma-5.6.7 +Class: Puma::Binder — Puma-5.6.9 @@ -50,7 +50,7 @@@@ -399,7 +400,7 @@ [ GitHub ] + [ GitHub ]
-@@ -464,7 +465,7 @@- [ GitHub ] + [ GitHub ]
@@ -497,7 +498,7 @@- [ GitHub ] + [ GitHub ]
@@ -532,7 +533,7 @@- [ GitHub ] + [ GitHub ]
@@ -565,7 +566,7 @@- [ GitHub ] + [ GitHub ]
@@ -582,7 +583,7 @@
#ios (rw)
- [ GitHub ] + [ GitHub ]@@ -615,7 +616,7 @@- [ GitHub ] + [ GitHub ]
@@ -648,7 +649,7 @@- [ GitHub ] + [ GitHub ]
@@ -681,7 +682,7 @@- [ GitHub ] + [ GitHub ]
@@ -698,7 +699,7 @@
#loopback_addresses (readonly, private)
- [ GitHub ] + [ GitHub ]@@ -735,7 +736,7 @@- [ GitHub ] + [ GitHub ]
@@ -768,7 +769,7 @@- [ GitHub ] + [ GitHub ]
@@ -786,7 +787,7 @@Instance Method Details
#add_ssl_listener(host, port, ctx, optimize_for_latency = true, backlog = 1024)
- [ GitHub ] + [ GitHub ]- [ GitHub ] + [ GitHub ]@@ -841,7 +842,7 @@
- [ GitHub ] + [ GitHub ]@@ -884,7 +885,7 @@
@@ -934,7 +935,7 @@
#close
- [ GitHub ] + [ GitHub ]@@ -953,7 +954,7 @@
#close_listeners
- [ GitHub ] + [ GitHub ]@@ -1000,7 +1001,7 @@- [ GitHub ] + [ GitHub ]
@@ -1049,7 +1050,7 @@- [ GitHub ] + [ GitHub ]
@@ -1071,7 +1072,7 @@
#env(sock)
- [ GitHub ] + [ GitHub ]@@ -1090,7 +1091,7 @@
#inherit_ssl_listener(fd, ctx)
- [ GitHub ] + [ GitHub ]@@ -1123,7 +1124,7 @@
#inherit_tcp_listener(host, port, fd)
- [ GitHub ] + [ GitHub ]@@ -1145,7 +1146,7 @@
#inherit_unix_listener(path, fd)
- [ GitHub ] + [ GitHub ]@@ -1172,7 +1173,7 @@
#loc_addr_str(io) (private)
- [ GitHub ] + [ GitHub ]@@ -1196,7 +1197,7 @@
#localhost_authority
- [ GitHub ] + [ GitHub ]@@ -1215,7 +1216,7 @@
#localhost_authority_context
- [ GitHub ] + [ GitHub ]@@ -1242,7 +1243,7 @@
#parse(binds, logger, log_msg = 'Listening')
- [ GitHub ] + [ GitHub ]@@ -1411,7 +1412,7 @@
#redirects_for_restart
- [ GitHub ] + [ GitHub ]@@ -1448,7 +1449,7 @@- [ GitHub ] + [ GitHub ]
@@ -514,11 +537,11 @@@@ -1485,7 +1486,7 @@- [ GitHub ] + [ GitHub ]
- [ GitHub ] + [ GitHub ]@@ -1517,7 +1518,7 @@
@@ -189,7 +189,7 @@diff --git a/puma5/Puma/CLI.html b/puma5/Puma/CLI.html index 2b54ef3..7fc33b8 100644 --- a/puma5/Puma/CLI.html +++ b/puma5/Puma/CLI.html @@ -8,7 +8,7 @@ -- # File 'lib/puma/cli.rb', line 25Class: Puma::CLI — Puma-5.6.7 +Class: Puma::CLI — Puma-5.6.9 @@ -50,7 +50,7 @@ Launcher::KEYS_NOT_TO_PERSIST_IN_STATE+ # File 'lib/puma/cli.rb', line 25Launcher::KEYS_NOT_TO_PERSIST_IN_STATE[ GitHub ] + [ GitHub ]
-- # File 'lib/puma/client.rb', line 58@@ -247,7 +247,7 @@Instance Attribute Details
#launcher (readonly)
- [ GitHub ] + [ GitHub ]- # File 'lib/puma/client.rb', line 52@@ -265,7 +265,7 @@Instance Method Details
#configure_control_url(command_line_arg) (private)
- [ GitHub ] + [ GitHub ]- [ GitHub ] + [ GitHub ]@@ -295,7 +295,7 @@
- [ GitHub ] + [ GitHub ]@@ -321,7 +321,7 @@
- # File 'lib/puma/client.rb', line 47@@ -494,7 +494,7 @@- [ GitHub ] + [ GitHub ]
diff --git a/puma5/Puma/Client.html b/puma5/Puma/Client.html index 21d7178..a32024f 100644 --- a/puma5/Puma/Client.html +++ b/puma5/Puma/Client.html @@ -8,7 +8,7 @@ -- # File 'lib/puma/client.rb', line 44Class: Puma::Client — Puma-5.6.7 +Class: Puma::Client — Puma-5.6.9 @@ -50,7 +50,7 @@ %w[compress deflate gzip].freeze+ # File 'lib/puma/client.rb', line 44%w[compress deflate gzip].freezeCHUNK_SIZE_INVALID = @@ -138,17 +138,17 @@ Constant Summary
/[^\h]/.freeze+ # File 'lib/puma/client.rb', line 47/[^\h]/.freezeCHUNK_VALID_ENDING =
- # File 'lib/puma/client.rb', line 48Const::LINE_END+ # File 'lib/puma/client.rb', line 48Const::LINE_ENDCHUNK_VALID_ENDING_SIZE =
- # File 'lib/puma/client.rb', line 49CHUNK_VALID_ENDING.bytesize+ # File 'lib/puma/client.rb', line 49CHUNK_VALID_ENDING.bytesizeCONTENT_LENGTH_VALUE_INVALID = @@ -159,7 +159,7 @@ Constant Summary
/[^\d]/.freeze+ # File 'lib/puma/client.rb', line 60/[^\d]/.freezeEmptyBody = @@ -170,12 +170,34 @@ Constant Summary
NullIO.new+ # File 'lib/puma/client.rb', line 66NullIO.new+ ++ MAX_CHUNK_EXCESS = + +++ # File 'lib/puma/client.rb', line 57+ ++The maximum amount of excess data the client sends using chunk size extensions before we abort the connection.
+ +16 * 1024++ MAX_CHUNK_HEADER_SIZE = + ++ # File 'lib/puma/client.rb', line 53+ ++The maximum number of bytes we’ll buffer looking for a valid chunk header.
+ +4096
TE_ERR_MSG =
- # File 'lib/puma/client.rb', line 54'Invalid Transfer-Encoding'
+ # File 'lib/puma/client.rb', line 62'Invalid Transfer-Encoding'
@@ -259,6 +281,7 @@
Const
- Included
Co TRANSFER_ENCODING, TRANSFER_ENCODING2, TRANSFER_ENCODING_CHUNKED, + UNMASKABLE_HEADERS, WRITE_TIMEOUT
[ GitHub ] + [ GitHub ]
-- +-# File 'lib/puma/client.rb', line 63
+# File 'lib/puma/client.rb', line 71
def initialize(io, env=nil) @@ -566,11 +589,11 @@Instance Attribute Details
#body (readonly)
- [ GitHub ] + [ GitHub ]- +-- [ GitHub ] + [ GitHub ]# File 'lib/puma/client.rb', line 99
+# File 'lib/puma/client.rb', line 107
attr_reader :env, :to_io, :body, :io, :timeout_at, :ready, :hijacked, @@ -602,11 +625,11 @@
- +-# File 'lib/puma/client.rb', line 289
+# File 'lib/puma/client.rb', line 297
def can_close? @@ -622,11 +645,11 @@
#env (readonly)
- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 99
+# File 'lib/puma/client.rb', line 107
attr_reader :env, :to_io, :body, :io, :timeout_at, :ready, :hijacked, @@ -640,11 +663,11 @@
#expect_proxy_proto=(val) (writeonly)
- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 294
+# File 'lib/puma/client.rb', line 302
def expect_proxy_proto=(val) @@ -666,11 +689,11 @@
#hijacked (readonly)
- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 99
+# File 'lib/puma/client.rb', line 107
attr_reader :env, :to_io, :body, :io, :timeout_at, :ready, :hijacked, @@ -684,11 +707,11 @@
#in_data_phase (readonly)
- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 127
+# File 'lib/puma/client.rb', line 135
def in_data_phase @@ -703,11 +726,11 @@
#inspect (readonly)
- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 115
+# File 'lib/puma/client.rb', line 123
def inspect @@ -722,11 +745,11 @@
#io (readonly)
- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 99
+# File 'lib/puma/client.rb', line 107
attr_reader :env, :to_io, :body, :io, :timeout_at, :ready, :hijacked, @@ -750,11 +773,11 @@[ GitHub ] + [ GitHub ]
-- +-# File 'lib/puma/client.rb', line 110
+# File 'lib/puma/client.rb', line 118
def io_ok? @@ -769,11 +792,11 @@
#listener (rw)
- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 104
+# File 'lib/puma/client.rb', line 112
attr_accessor :remote_addr_header, :listener @@ -786,11 +809,11 @@
#peerip (rw)
- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 273
+# File 'lib/puma/client.rb', line 281
def peerip @@ -813,11 +836,11 @@
#peerip=(value) (rw)
- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 102
+# File 'lib/puma/client.rb', line 110
attr_writer :peerip @@ -830,11 +853,11 @@
#ready (readonly)
- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 99
+# File 'lib/puma/client.rb', line 107
attr_reader :env, :to_io, :body, :io, :timeout_at, :ready, :hijacked, @@ -848,11 +871,11 @@
#remote_addr_header (rw)
- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 104
+# File 'lib/puma/client.rb', line 112
attr_accessor :remote_addr_header, :listener @@ -865,11 +888,11 @@
#tempfile (readonly)
- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 99
+# File 'lib/puma/client.rb', line 107
attr_reader :env, :to_io, :body, :io, :timeout_at, :ready, :hijacked, @@ -883,11 +906,11 @@
#timeout_at (readonly)
- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 99
+# File 'lib/puma/client.rb', line 107
attr_reader :env, :to_io, :body, :io, :timeout_at, :ready, :hijacked, @@ -901,11 +924,11 @@
#to_io (readonly)
- [ GitHub ] + [ GitHub ]- +- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 121
+# File 'lib/puma/client.rb', line 129
def call @@ -947,11 +970,11 @@
#close
- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 178
+# File 'lib/puma/client.rb', line 186
def close @@ -970,11 +993,11 @@
#decode_chunk(chunk) (private)
- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 481
+# File 'lib/puma/client.rb', line 490
def decode_chunk(chunk) @@ -1040,6 +1063,20 @@end end + # Track the excess as a function of the size of the + # header vs the size of the actual data. Excess can + # go negative (and is expected to) when the body is + # significant. + # The additional of chunk_hex.size and 2 compensates + # for a client sending 1 byte in a chunked body over + # a long period of time, making sure that that client + # isn't accidentally eventually punished. + @excess_cr += (line.size - len - chunk_hex.size - 2) + + if @excess_cr >= MAX_CHUNK_EXCESS + raise HttpParserError, "Maximum chunk excess detected" + end + len += 2 part = io.read(len) @@ -1067,6 +1104,10 @@
@partial_part_left = len - part.size end else + if @prev_chunk.size + chunk.size >= MAX_CHUNK_HEADER_SIZE + raise HttpParserError, "maximum size of chunk header exceeded" + end + @prev_chunk = line return false end @@ -1088,11 +1129,11 @@
#eagerly_finish
- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 250
+# File 'lib/puma/client.rb', line 258
def eagerly_finish @@ -1109,11 +1150,11 @@
#finish(timeout)
- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 256
+# File 'lib/puma/client.rb', line 264
def finish(timeout) @@ -1129,11 +1170,11 @@
#read_body (private)
- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 389
+# File 'lib/puma/client.rb', line 397
def read_body @@ -1189,11 +1230,11 @@
#read_chunked_body (private)
- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 434
+# File 'lib/puma/client.rb', line 442
def read_chunked_body @@ -1229,11 +1270,11 @@
#reset(fast_check = true)
- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 140
+# File 'lib/puma/client.rb', line 148
def reset(fast_check=true) @@ -1282,11 +1323,11 @@
#set_ready (private)
- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 584
+# File 'lib/puma/client.rb', line 611
def set_ready @@ -1305,11 +1346,11 @@
#set_timeout(val)
- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 131
+# File 'lib/puma/client.rb', line 139
def set_timeout(val) @@ -1324,11 +1365,11 @@
#setup_body (private)
- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 307
+# File 'lib/puma/client.rb', line 315
def setup_body @@ -1421,17 +1462,18 @@
#setup_chunked_body(body) (private)
- [ GitHub ] + [ GitHub ]- +- [ GitHub ] + [ GitHub ]-# File 'lib/puma/client.rb', line 459
+# File 'lib/puma/client.rb', line 467
def setup_chunked_body(body) @chunked_body = true @partial_part_left = 0 @prev_chunk = "" + @excess_cr = 0 @body = Tempfile.new(Const::PUMA_TMP_BASE) @body.unlink @@ -1460,11 +1502,11 @@
- +-- [ GitHub ] + [ GitHub ]# File 'lib/puma/client.rb', line 136
+# File 'lib/puma/client.rb', line 144
def timeout @@ -1493,11 +1535,11 @@
- +-# File 'lib/puma/client.rb', line 261
+# File 'lib/puma/client.rb', line 269
def timeout! @@ -1513,11 +1555,11 @@
#try_to_finish
- [ GitHub ] + [ GitHub ]- +- [ GitHub ] + [ GitHub ]-# File 'lib/puma/client.rb', line 210
+# File 'lib/puma/client.rb', line 218
def try_to_finish @@ -1575,11 +1617,11 @@
- +-- [ GitHub ] + [ GitHub ]# File 'lib/puma/client.rb', line 188
+# File 'lib/puma/client.rb', line 196
def try_to_parse_proxy_protocol @@ -1628,11 +1670,11 @@
- +-# File 'lib/puma/client.rb', line 477
+# File 'lib/puma/client.rb', line 486
def write_chunk(str) @@ -1647,11 +1689,11 @@
#write_error(status_code)
- [ GitHub ] + [ GitHub ]- +-# File 'lib/puma/client.rb', line 266
+# File 'lib/puma/client.rb', line 274
def write_error(status_code) diff --git a/puma5/Puma/Cluster.html b/puma5/Puma/Cluster.html index c29d1c3..9899c31 100644 --- a/puma5/Puma/Cluster.html +++ b/puma5/Puma/Cluster.html @@ -8,7 +8,7 @@ -Class: Puma::Cluster — Puma-5.6.7 +Class: Puma::Cluster — Puma-5.6.9 @@ -50,7 +50,7 @@