puma 4.3.6-java → 4.3.7-java
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puma might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/History.md +6 -0
- data/ext/puma_http11/extconf.rb +1 -1
- data/lib/puma/client.rb +21 -9
- data/lib/puma/const.rb +1 -1
- data/lib/puma/puma_http11.jar +0 -0
- data/lib/puma/server.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 781f3047448b2b27145e6c7c6f4a98f9d61485ca579242ec5760fea20cabe642
|
4
|
+
data.tar.gz: 161a15f8d95b8aafb36596d15efcd58feb37f5777656c6d755e061e3208667b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 026e69eb534503bae1b15b76f120678941cadd743630f4b93c3941719b4fcd49616af0bbc89fdad3e06bea86ebd7d11bc438d6223d368b21cb434c36f9d39db0
|
7
|
+
data.tar.gz: 10aa9559de2ecdbb9fe7dd5760075d65618c408023de766994bc6e3c0679e7e76480a1f5b9bf51874805ca68047dd34574323e5dcc7d0ef0874f8c433abea648
|
data/History.md
CHANGED
@@ -1,8 +1,14 @@
|
|
1
|
+
## 4.3.7 / 2020-11-30
|
2
|
+
|
3
|
+
* Bugfixes
|
4
|
+
* Backport set CONTENT_LENGTH for chunked requests (Originally: #2287, backport: #2496)
|
5
|
+
|
1
6
|
## 4.3.6 / 2020-09-05
|
2
7
|
|
3
8
|
* Bugfixes
|
4
9
|
* Explicitly include ctype.h to fix compilation warning and build error on macOS with Xcode 12 (#2304)
|
5
10
|
* Don't require json at boot (#2269)
|
11
|
+
* Set `CONTENT_LENGTH` for chunked requests (#2287)
|
6
12
|
|
7
13
|
## 4.3.4/4.3.5 and 3.12.5/3.12.6 / 2020-05-22
|
8
14
|
|
data/ext/puma_http11/extconf.rb
CHANGED
data/lib/puma/client.rb
CHANGED
@@ -153,7 +153,7 @@ module Puma
|
|
153
153
|
|
154
154
|
begin
|
155
155
|
data = @io.read_nonblock(CHUNK_SIZE)
|
156
|
-
rescue
|
156
|
+
rescue IO::WaitReadable
|
157
157
|
return false
|
158
158
|
rescue SystemCallError, IOError, EOFError
|
159
159
|
raise ConnectionError, "Connection error detected during read"
|
@@ -351,7 +351,7 @@ module Puma
|
|
351
351
|
|
352
352
|
begin
|
353
353
|
chunk = @io.read_nonblock(want)
|
354
|
-
rescue
|
354
|
+
rescue IO::WaitReadable
|
355
355
|
return false
|
356
356
|
rescue SystemCallError, IOError
|
357
357
|
raise ConnectionError, "Connection error detected during read"
|
@@ -397,7 +397,10 @@ module Puma
|
|
397
397
|
raise EOFError
|
398
398
|
end
|
399
399
|
|
400
|
-
|
400
|
+
if decode_chunk(chunk)
|
401
|
+
@env[CONTENT_LENGTH] = @chunked_content_length
|
402
|
+
return true
|
403
|
+
end
|
401
404
|
end
|
402
405
|
end
|
403
406
|
|
@@ -410,19 +413,28 @@ module Puma
|
|
410
413
|
@body.binmode
|
411
414
|
@tempfile = @body
|
412
415
|
|
413
|
-
|
416
|
+
@chunked_content_length = 0
|
417
|
+
|
418
|
+
if decode_chunk(body)
|
419
|
+
@env[CONTENT_LENGTH] = @chunked_content_length
|
420
|
+
return true
|
421
|
+
end
|
422
|
+
end
|
423
|
+
|
424
|
+
def write_chunk(str)
|
425
|
+
@chunked_content_length += @body.write(str)
|
414
426
|
end
|
415
427
|
|
416
428
|
def decode_chunk(chunk)
|
417
429
|
if @partial_part_left > 0
|
418
430
|
if @partial_part_left <= chunk.size
|
419
431
|
if @partial_part_left > 2
|
420
|
-
|
432
|
+
write_chunk(chunk[0..(@partial_part_left-3)]) # skip the \r\n
|
421
433
|
end
|
422
434
|
chunk = chunk[@partial_part_left..-1]
|
423
435
|
@partial_part_left = 0
|
424
436
|
else
|
425
|
-
|
437
|
+
write_chunk(chunk) if @partial_part_left > 2 # don't include the last \r\n
|
426
438
|
@partial_part_left -= chunk.size
|
427
439
|
return false
|
428
440
|
end
|
@@ -469,12 +481,12 @@ module Puma
|
|
469
481
|
|
470
482
|
case
|
471
483
|
when got == len
|
472
|
-
|
484
|
+
write_chunk(part[0..-3]) # to skip the ending \r\n
|
473
485
|
when got <= len - 2
|
474
|
-
|
486
|
+
write_chunk(part)
|
475
487
|
@partial_part_left = len - part.size
|
476
488
|
when got == len - 1 # edge where we get just \r but not \n
|
477
|
-
|
489
|
+
write_chunk(part[0..-2])
|
478
490
|
@partial_part_left = len - part.size
|
479
491
|
end
|
480
492
|
else
|
data/lib/puma/const.rb
CHANGED
@@ -100,7 +100,7 @@ module Puma
|
|
100
100
|
# too taxing on performance.
|
101
101
|
module Const
|
102
102
|
|
103
|
-
PUMA_VERSION = VERSION = "4.3.
|
103
|
+
PUMA_VERSION = VERSION = "4.3.7".freeze
|
104
104
|
CODE_NAME = "Mysterious Traveller".freeze
|
105
105
|
PUMA_SERVER_STRING = ['puma', PUMA_VERSION, CODE_NAME].join(' ').freeze
|
106
106
|
|
data/lib/puma/puma_http11.jar
CHANGED
Binary file
|
data/lib/puma/server.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.3.
|
4
|
+
version: 4.3.7
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Evan Phoenix
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|