protocol-http1 0.28.1 → 0.30.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 418429eead441a575d5129d78ec4eaa2806e354219b44f8be723ba263ed6dff4
4
- data.tar.gz: 2306e29dfe8ecf2344fc0b3672be0b4bbab681139e81b3b7f710821aba858ee2
3
+ metadata.gz: a8e19e671a7c4596842f4bcc2a8b82e395a24ed3754c8205625747223fd574f5
4
+ data.tar.gz: 5a911681a3193eebc65d5a329045d413e2508ef2b20f28a4abe52bf6b09aad57
5
5
  SHA512:
6
- metadata.gz: f30451ee6eb024628fd4edb09b688206b4fb956080b11bd83ca1c243eb66a50473e03b710ff19cd1a94e1c34a3197bd3b584566694b5a3d9171c5d4b3de773f0
7
- data.tar.gz: b89b24a8163a31f91d801472d3fc44f207dd909ad66c9caeffbd737c674e8905cdc93ac328db2aeca049896011ad093532e87fa608fe01672c645e55b6689f34
6
+ metadata.gz: a40371b329727872dd04be0a0902e771c7a3231a4262380c84c4abfa96065a73d4088b0f3fc2c0b25b8f1882cd03ba6e888d786018934b1a5230a4c3676fbb54
7
+ data.tar.gz: 7fa713254161dad9802b8783c45f290f30993f1957ce64d4d2dd3718e699d8195a6e56dc9991aeba06c2c773be83e672b7f522e093ee3de30187ec8a1b0198bb
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2024, by Samuel Williams.
4
+ # Copyright, 2019-2025, by Samuel Williams.
5
5
  # Copyright, 2019, by Brian Morearty.
6
6
  # Copyright, 2020, by Bruno Sutic.
7
7
  # Copyright, 2023-2024, by Thomas Morgan.
@@ -224,11 +224,11 @@ module Protocol
224
224
  return self
225
225
  end
226
226
 
227
- def write_request(authority, method, path, version, headers)
227
+ def write_request(authority, method, target, version, headers)
228
228
  open!
229
229
 
230
- @stream.write("#{method} #{path} #{version}\r\n")
231
- @stream.write("host: #{authority}\r\n")
230
+ @stream.write("#{method} #{target} #{version}\r\n")
231
+ @stream.write("host: #{authority}\r\n") if authority
232
232
 
233
233
  write_headers(headers)
234
234
  end
@@ -330,7 +330,11 @@ module Protocol
330
330
 
331
331
  @count += 1
332
332
 
333
- return headers.delete(HOST), method, path, version, headers, body
333
+ if block_given?
334
+ yield headers.delete(HOST), method, path, version, headers, body
335
+ else
336
+ return headers.delete(HOST), method, path, version, headers, body
337
+ end
334
338
  end
335
339
 
336
340
  def read_response_line
@@ -366,7 +370,11 @@ module Protocol
366
370
  @count += 1
367
371
  end
368
372
 
369
- return version, status, reason, headers, body
373
+ if block_given?
374
+ yield version, status, reason, headers, body
375
+ else
376
+ return version, status, reason, headers, body
377
+ end
370
378
  end
371
379
 
372
380
  def read_headers
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2024, by Samuel Williams.
4
+ # Copyright, 2019-2025, by Samuel Williams.
5
5
 
6
6
  module Protocol
7
7
  module HTTP1
8
- VERSION = "0.28.1"
8
+ VERSION = "0.30.0"
9
9
  end
10
10
  end
data/license.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MIT License
2
2
 
3
- Copyright, 2019-2024, by Samuel Williams.
3
+ Copyright, 2019-2025, by Samuel Williams.
4
4
  Copyright, 2019, by Brian Morearty.
5
5
  Copyright, 2020, by Olle Jonsson.
6
6
  Copyright, 2020, by Bruno Sutic.
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.28.1
4
+ version: 0.30.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -10,7 +10,6 @@ authors:
10
10
  - Brian Morearty
11
11
  - Bruno Sutic
12
12
  - Olle Jonsson
13
- autorequire:
14
13
  bindir: bin
15
14
  cert_chain:
16
15
  - |
@@ -42,7 +41,7 @@ cert_chain:
42
41
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
43
42
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
44
43
  -----END CERTIFICATE-----
45
- date: 2024-10-15 00:00:00.000000000 Z
44
+ date: 2025-01-29 00:00:00.000000000 Z
46
45
  dependencies:
47
46
  - !ruby/object:Gem::Dependency
48
47
  name: protocol-http
@@ -58,8 +57,6 @@ dependencies:
58
57
  - - "~>"
59
58
  - !ruby/object:Gem::Version
60
59
  version: '0.22'
61
- description:
62
- email:
63
60
  executables: []
64
61
  extensions: []
65
62
  extra_rdoc_files: []
@@ -80,7 +77,6 @@ licenses:
80
77
  metadata:
81
78
  documentation_uri: https://socketry.github.io/protocol-http1/
82
79
  source_code_uri: https://github.com/socketry/protocol-http1.git
83
- post_install_message:
84
80
  rdoc_options: []
85
81
  require_paths:
86
82
  - lib
@@ -95,8 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
91
  - !ruby/object:Gem::Version
96
92
  version: '0'
97
93
  requirements: []
98
- rubygems_version: 3.5.11
99
- signing_key:
94
+ rubygems_version: 3.6.2
100
95
  specification_version: 4
101
96
  summary: A low level implementation of the HTTP/1 protocol.
102
97
  test_files: []
metadata.gz.sig CHANGED
Binary file