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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/context/headers.md +2 -2
- data/lib/protocol/http/body/deflate.rb +1 -1
- data/lib/protocol/http/body/writable.rb +4 -1
- data/lib/protocol/http/error.rb +1 -1
- data/lib/protocol/http/header/generic.rb +1 -1
- data/lib/protocol/http/version.rb +2 -2
- data/readme.md +4 -6
- data/releases.md +4 -0
- data.tar.gz.sig +0 -0
- metadata +2 -2
- 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: 86fc99bdf4478ab27c254aaf2c08879a76a7179d2f05979c022d7d9dd4149f7f
|
|
4
|
+
data.tar.gz: ef2431fbfddafb860028590fd5bfe641b3b7261e7beed8d5cdefea202b1423f6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
67
|
-
|
|
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, 2024-
|
|
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}.
|
data/lib/protocol/http/error.rb
CHANGED
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.
|
|
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.
|
|
131
|
+
version: '3.3'
|
|
132
132
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
133
|
requirements:
|
|
134
134
|
- - ">="
|
metadata.gz.sig
CHANGED
|
Binary file
|