protocol-http 0.59.0 → 0.60.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: e36f456a67fc57a222502502affe651c8f27d5b92b3a08918acfc8e5a8d54a1f
4
- data.tar.gz: 465441e3c8c02f95c46a22147c4f7716d2db2927dd901ccb0b4f8aa00196741a
3
+ metadata.gz: 86fc99bdf4478ab27c254aaf2c08879a76a7179d2f05979c022d7d9dd4149f7f
4
+ data.tar.gz: ef2431fbfddafb860028590fd5bfe641b3b7261e7beed8d5cdefea202b1423f6
5
5
  SHA512:
6
- metadata.gz: 887eff91a9b9ce7bbd7f7174029b34cb6b8039aa1dc4344d7eedc86dd398aec3bb81c16fd5d55d4e65b8175bba33baab785f2b8f4761a32d0c42be4c9d1eadf2
7
- data.tar.gz: b276d08be05079a3f00a87fc2fccbf1a7e517c9621424fa8de0678707a5c7eda6049db03f28a2ce335202d95282fe5748148bd9b9b6e36051d133997301fb92b
6
+ metadata.gz: 4169ced46a030ec0d90e4ae0711dabd4663ddc7f1c51a5f8687a3eee30d23754df5c537f19533d350681f03196403e3501bd568d3c3526c465c5760ca2939fce
7
+ data.tar.gz: 88f2b94a09f2ce2c9b3815e609056d7ae45c4e657455abc48073d5f6b61aca6ae4d6dd3ad7104a0e576abfdea1c7fff2f5f838ba11fa398ed40c041bc913f6c8
checksums.yaml.gz.sig CHANGED
Binary file
data/context/headers.md CHANGED
@@ -63,8 +63,8 @@ HTTP trailers are headers that appear after the message body. For security reaso
63
63
  ```ruby
64
64
  # Working with trailers
65
65
  headers = Protocol::HTTP::Headers.new([
66
- ["content-type", "text/html"],
67
- ["content-length", "1000"]
66
+ ["content-type", "text/html"],
67
+ ["content-length", "1000"]
68
68
  ])
69
69
 
70
70
  # Start trailer section
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2025, by Samuel Williams.
4
+ # Copyright, 2019-2026, by Samuel Williams.
5
5
 
6
6
  require_relative "wrapper"
7
7
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2024-2025, by Samuel Williams.
4
+ # Copyright, 2024-2026, by Samuel Williams.
5
5
 
6
6
  require_relative "readable"
7
7
 
@@ -28,6 +28,9 @@ module Protocol
28
28
  # @attribute [Integer] The length of the response body if known.
29
29
  attr :length
30
30
 
31
+ # @attribute [Integer] The number of chunks written to the body.
32
+ attr :count
33
+
31
34
  # Stop generating output; cause the next call to write to fail with the given error. Does not prevent existing chunks from being read. In other words, this indicates both that no more data will be or should be written to the body.
32
35
  #
33
36
  # @parameter error [Exception] The error that caused this body to be closed, if any. Will be raised on the next call to {read}.
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2018-2025, by Samuel Williams.
4
+ # Copyright, 2018-2026, by Samuel Williams.
5
5
 
6
6
  module Protocol
7
7
  module HTTP
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2025, by Samuel Williams.
4
+ # Copyright, 2026, by Samuel Williams.
5
5
 
6
6
  require_relative "split"
7
7
 
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2018-2025, by Samuel Williams.
4
+ # Copyright, 2018-2026, by Samuel Williams.
5
5
 
6
6
  module Protocol
7
7
  module HTTP
8
- VERSION = "0.59.0"
8
+ VERSION = "0.60.0"
9
9
  end
10
10
  end
data/readme.md CHANGED
@@ -30,6 +30,10 @@ Please see the [project documentation](https://socketry.github.io/protocol-http/
30
30
 
31
31
  Please see the [project releases](https://socketry.github.io/protocol-http/releases/index) for all releases.
32
32
 
33
+ ### v0.60.0
34
+
35
+ - Expose `Protocol::HTTP::Body::Writable#count` attribute to provide access to the number of chunks written to the body.
36
+
33
37
  ### v0.59.0
34
38
 
35
39
  - Introduce `Protocol::HTTP::Middleware.load` method for loading middleware applications from files.
@@ -84,12 +88,6 @@ Please see the [project releases](https://socketry.github.io/protocol-http/relea
84
88
  - Expose `tail` in `Headers.new` so that trailers can be accurately reproduced.
85
89
  - Add agent context.
86
90
 
87
- ### v0.51.0
88
-
89
- - `Protocol::HTTP::Headers` now raise a `DuplicateHeaderError` when a duplicate singleton header (e.g. `content-length`) is added.
90
- - `Protocol::HTTP::Headers#add` now coerces the value to a string when adding a header, ensuring consistent behaviour.
91
- - `Protocol::HTTP::Body::Head.for` now accepts an optional `length` parameter, allowing it to create a head body even when the body is not provided, based on the known content length.
92
-
93
91
  ## See Also
94
92
 
95
93
  - [protocol-http1](https://github.com/socketry/protocol-http1) — HTTP/1 client/server implementation using this
data/releases.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Releases
2
2
 
3
+ ## v0.60.0
4
+
5
+ - Expose `Protocol::HTTP::Body::Writable#count` attribute to provide access to the number of chunks written to the body.
6
+
3
7
  ## v0.59.0
4
8
 
5
9
  - Introduce `Protocol::HTTP::Middleware.load` method for loading middleware applications from files.
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protocol-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.59.0
4
+ version: 0.60.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -128,7 +128,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - ">="
130
130
  - !ruby/object:Gem::Version
131
- version: '3.2'
131
+ version: '3.3'
132
132
  required_rubygems_version: !ruby/object:Gem::Requirement
133
133
  requirements:
134
134
  - - ">="
metadata.gz.sig CHANGED
Binary file