protocol-http1 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of protocol-http1 might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/protocol/http1/body/chunked.rb +0 -2
- data/lib/protocol/http1/connection.rb +6 -2
- data/lib/protocol/http1/version.rb +1 -1
- data/protocol-http1.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1abaeacab084824635ae655081cf73fad89ff35597a3a8e8e2e0dc0ecd287903
|
4
|
+
data.tar.gz: a1b0f0f814c709a9e39cbceba69626853e5b64f5880d5ef4770e171d0c9730c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 655ebb21bf200f6ea36af2d34d02d6666ab85166f8d769b5a378dcaa9612a9c6738c9ee27856419745dfa96f2dd183bbef56c5ce72173c8f8258b0bd16da6262
|
7
|
+
data.tar.gz: d4e60fd12521536bf46dff62ef9097f88b47137ce476285484ff06229a9e9e67e7e19c9e42ee8b31522a187eea61eb27d9afe651ba0c9d6b045db43ee5d7081a
|
@@ -357,12 +357,16 @@ module Protocol
|
|
357
357
|
end
|
358
358
|
|
359
359
|
def write_body(version, body, head = false, trailers = nil)
|
360
|
-
if body.nil?
|
360
|
+
if body.nil?
|
361
361
|
write_connection_header(version)
|
362
362
|
write_empty_body(body)
|
363
|
-
elsif length = body.length
|
363
|
+
elsif length = body.length and (VERSION != HTTP11 && trailers.nil?)
|
364
364
|
write_connection_header(version)
|
365
365
|
write_fixed_length_body(body, length, head)
|
366
|
+
elsif body.empty?
|
367
|
+
# Even thought this code is the same as the first clause `body.nil?`, HEAD responses have an empty body but still carry a content length. `write_fixed_length_body` takes care of this appropriately.
|
368
|
+
write_connection_header(version)
|
369
|
+
write_empty_body(body)
|
366
370
|
elsif @persistent and version == HTTP11
|
367
371
|
write_connection_header(version)
|
368
372
|
# We specifically ensure that non-persistent connections do not use chunked response, so that hijacking works as expected.
|
data/protocol-http1.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
21
21
|
spec.require_paths = ["lib"]
|
22
22
|
|
23
|
-
spec.add_dependency "protocol-http", "~> 0.
|
23
|
+
spec.add_dependency "protocol-http", "~> 0.17"
|
24
24
|
|
25
25
|
spec.add_development_dependency "covered"
|
26
26
|
spec.add_development_dependency "bundler"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protocol-http1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: protocol-http
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: '0.17'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: '0.17'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: covered
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|