protocol-http1 0.3.0 → 0.4.0

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.

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: 815238149caf3e1fd7ee9f4c049488bd3eba0f669ed98a0491ad26d68b854157
4
- data.tar.gz: d5d7cf91e4c19039ca8dbe506bd51d3c3f2ecb106c3e73f77a737068be8ea8db
3
+ metadata.gz: 16eb145e7bee92057ede1a6c38601835d99d8a6b476bac5332e9b1fea80d1806
4
+ data.tar.gz: cab4969c7602e859670955347184cd5de8fe5d5220206e3570ea27520d3b0249
5
5
  SHA512:
6
- metadata.gz: '09c9c15b227b3c2c23adf7175c1b5610a31869dcac60b819870a51e2828ec78929e9210e210cb71a9c32f4ef95f07cd7f30c0320ee97893c8cf0994d503faff6'
7
- data.tar.gz: 95252b355145060621c4c47fa367d37a3c3bf2d1155bafcee3bd921eb8f3c9d3a542750d5ddbf7038fd5bbee3276b1cc5e80545c3347f99443e283ffe7aaf814
6
+ metadata.gz: 2bacb6039e5c43a157efe6c766de3ef510fb8e9ca0c33780bf63434b93f9cb9848ab1270b874f4930b1ff079ab7a3303bcc53bca905e6d1c408d0067dd6cdcf6
7
+ data.tar.gz: 2c7d5de57e9155af480fd6c1eab63b96da036f8750db89ee83e31895cd901b1f69434592b6a88e6ee2f6bf7c2d92f0ac2be50bded4317f397d04bb25ddd0953e
@@ -224,7 +224,7 @@ module Protocol
224
224
 
225
225
  begin
226
226
  body.call(@stream)
227
- rescue
227
+ ensure
228
228
  @stream.close_write
229
229
  end
230
230
  end
@@ -343,6 +343,10 @@ module Protocol
343
343
  read_remainder_body
344
344
  end
345
345
 
346
+ def read_upgrade_body
347
+ read_remainder_body
348
+ end
349
+
346
350
  def read_remainder_body
347
351
  @stream.read
348
352
  end
@@ -428,6 +432,11 @@ module Protocol
428
432
  end
429
433
  end
430
434
 
435
+ if upgrade = upgrade?(headers)
436
+ @upgrade = upgrade
437
+ return read_upgrade_body
438
+ end
439
+
431
440
  if remainder
432
441
  # 7. Otherwise, this is a response message without a declared message
433
442
  # body length, so the message body length is determined by the
@@ -1,5 +1,5 @@
1
1
  module Protocol
2
2
  module HTTP1
3
- VERSION = "0.3.0"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
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.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-09 00:00:00.000000000 Z
11
+ date: 2019-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: protocol-http