protocol-http1 0.14.3 → 0.14.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/protocol/http1/connection.rb +4 -2
- data/lib/protocol/http1/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 366333c95d6b5a02d91e6f87c0274fddbe09a8c858bcb3e1cd54dfd5198794a6
|
|
4
|
+
data.tar.gz: 99db7c604bcd4a24ff8a96a7eb8aa7096b0f5f517849569780ff3b12aac58026
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cf0f094e6bf752d20115320c94c1796a56f835f524412ea3c9e51324be1802f517f8585838ee0fb7733529cac33adcc0d557d3ac255ab85fbdbdbf13686f00c1
|
|
7
|
+
data.tar.gz: 2c64561ec15d5842047d92311ef7130562ccca0f2302d79e2dcb5c52b85bbe7617235cd22a33cdd10d2b96c0ec2e0faa50c4514b1d48cc674702b7ed3febc5e4
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
|
@@ -334,7 +334,7 @@ module Protocol
|
|
|
334
334
|
@stream.flush unless body.ready?
|
|
335
335
|
end
|
|
336
336
|
|
|
337
|
-
if trailer
|
|
337
|
+
if trailer&.any?
|
|
338
338
|
@stream.write("0\r\n")
|
|
339
339
|
write_headers(trailer)
|
|
340
340
|
@stream.write("\r\n")
|
|
@@ -372,11 +372,13 @@ module Protocol
|
|
|
372
372
|
end
|
|
373
373
|
|
|
374
374
|
# While writing the body, we don't know if trailers will be added. We must choose a different body format depending on whether there is the chance of trailers, even if trailer.any? is currently false.
|
|
375
|
+
#
|
|
376
|
+
# Below you notice `and trailer.nil?`. I tried this but content-length is more important than trailers.
|
|
375
377
|
|
|
376
378
|
if body.nil?
|
|
377
379
|
write_connection_header(version)
|
|
378
380
|
write_empty_body(body)
|
|
379
|
-
elsif length = body.length and trailer.nil?
|
|
381
|
+
elsif length = body.length # and trailer.nil?
|
|
380
382
|
write_connection_header(version)
|
|
381
383
|
write_fixed_length_body(body, length, head)
|
|
382
384
|
elsif body.empty?
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|