rack 3.1.0 → 3.1.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rack might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/rack/constants.rb +1 -0
- data/lib/rack/content_length.rb +1 -0
- data/lib/rack/response.rb +7 -2
- data/lib/rack/version.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: c5d6ff669a9e2d87cf8c2fb3fe727be68d2ac5df2a80a802163ed2cff8905627
|
4
|
+
data.tar.gz: 9e9917744a2d792217fb2f94c3d784fe6fcb0b4c44f7f34b864eafc50f329eb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 293185b6af220249e49546d5a200e2cc2b55ff6e2424f472c5f01bdc37f3ed4e3aa4dc54df52108c3a42b7738c2e87dde74891f761f6120959b486f6e8b5eb29
|
7
|
+
data.tar.gz: d36b0721982e00065ee52a54719e86cb1914ec3086629c3958b6d510c9dd513ac75749be55008a5755e96ab918b302cb867719a256e50aced434361225c60da3
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,16 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file. For info on how to format all future additions to this file please reference [Keep A Changelog](https://keepachangelog.com/en/1.0.0/).
|
4
4
|
|
5
|
+
## [3.1.2] - 2024-06-11
|
6
|
+
|
7
|
+
## Changed
|
8
|
+
|
9
|
+
- `Rack::Response` will take in to consideration chunked encoding responses ([#2204](https://github.com/rack/rack/pull/2204), [@tenderlove])
|
10
|
+
|
11
|
+
## [3.1.1] - 2024-06-11
|
12
|
+
|
13
|
+
- Oops, I shouldn't have shipped this
|
14
|
+
|
5
15
|
## [3.1.0] - 2024-06-11
|
6
16
|
|
7
17
|
### SPEC Changes
|
data/lib/rack/constants.rb
CHANGED
data/lib/rack/content_length.rb
CHANGED
data/lib/rack/response.rb
CHANGED
@@ -25,6 +25,7 @@ module Rack
|
|
25
25
|
self.new(body, status, headers)
|
26
26
|
end
|
27
27
|
|
28
|
+
CHUNKED = 'chunked'
|
28
29
|
STATUS_WITH_NO_ENTITY_BODY = Utils::STATUS_WITH_NO_ENTITY_BODY
|
29
30
|
|
30
31
|
attr_accessor :length, :status, :body
|
@@ -89,7 +90,11 @@ module Rack
|
|
89
90
|
self.status = status
|
90
91
|
self.location = target
|
91
92
|
end
|
92
|
-
|
93
|
+
|
94
|
+
def chunked?
|
95
|
+
CHUNKED == get_header(TRANSFER_ENCODING)
|
96
|
+
end
|
97
|
+
|
93
98
|
def no_entity_body?
|
94
99
|
# The response body is an enumerable body and it is not allowed to have an entity body.
|
95
100
|
@body.respond_to?(:each) && STATUS_WITH_NO_ENTITY_BODY[@status]
|
@@ -105,7 +110,7 @@ module Rack
|
|
105
110
|
close
|
106
111
|
return [@status, @headers, []]
|
107
112
|
else
|
108
|
-
if @length && @length > 0
|
113
|
+
if @length && @length > 0 && !chunked?
|
109
114
|
set_header CONTENT_LENGTH, @length.to_s
|
110
115
|
end
|
111
116
|
|
data/lib/rack/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leah Neukirchen
|
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '0'
|
160
160
|
requirements: []
|
161
|
-
rubygems_version: 3.5.
|
161
|
+
rubygems_version: 3.5.3
|
162
162
|
signing_key:
|
163
163
|
specification_version: 4
|
164
164
|
summary: A modular Ruby webserver interface.
|