protocol-http1 0.14.3 → 0.14.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 41a5950eeaafb157d2d4e52b00eb3ea42f509b6c43514d3cf5c5449912ab940f
4
- data.tar.gz: e8f2b0f46f39b8e332ee45a732aa186b24f9d83cdeec2bd13b2ac619081dbfa6
3
+ metadata.gz: 366333c95d6b5a02d91e6f87c0274fddbe09a8c858bcb3e1cd54dfd5198794a6
4
+ data.tar.gz: 99db7c604bcd4a24ff8a96a7eb8aa7096b0f5f517849569780ff3b12aac58026
5
5
  SHA512:
6
- metadata.gz: 7d46d17db36223ddc01cab220eb12780aa463a0a87e520b06b375248a4d79c74512e1c5fd2299bb30aa8479514657f8611508114954ef03b8edf867590d74bf2
7
- data.tar.gz: a627ea0d0dfabe5759d1b87c575e5ab17eea367acc2b622155443cf28ba9bd7e9f4368a7d05fcc8ef58bcac9dcb80b06a4fb95de3d7189993fc00818ba37cb23
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?
@@ -22,6 +22,6 @@
22
22
 
23
23
  module Protocol
24
24
  module HTTP1
25
- VERSION = "0.14.3"
25
+ VERSION = "0.14.4"
26
26
  end
27
27
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protocol-http1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.3
4
+ version: 0.14.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file