protocol-http1 0.37.1 → 0.39.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: 97a6f38e50bdc78455b7f57895ef25df4dde6492142c2c60c40373b632c3db3b
4
- data.tar.gz: 0fb9af13fd1beeb21082c7d1860604b1bc947d343598c6347387d99707990894
3
+ metadata.gz: 0e973bb5fe97e0766eccc257775e2549397eb1fa8f308851e653987e90f05d66
4
+ data.tar.gz: a688b1894c1eeb0dc5c0dd08eb40259b16e6e4b749d6d35939cd3468b5011393
5
5
  SHA512:
6
- metadata.gz: b3cb82192723452081180be601e36491fe2a5d2b5f05fcc3556080a9311c846bdf2844c499981ac52338170cefdd097584ba8b53c52153af54cc29fbb4a405d9
7
- data.tar.gz: a4013c3278818c2a632d3f41e46a6625c286f59391990819bda5b29c3c5d4fd82c328acae59107a4abeb5268deebc16bf91e3d3584a3b1be42ab3105a941a352
6
+ metadata.gz: a2fb5ee2311c5536d3d3e75e609a7a577f69854dc5449a04755ac4a0efea07d042b5d0f13b4c42563ad1d762f1ffed421889ab29f1b3392bada9e0a03e314726
7
+ data.tar.gz: d9ad14658632916da00953025fac66e6644be9e1e9504d5ad7e5a2bd74577c7ea21ce2073194ff2e9034e865172b609da3f03323d52ff4176f70957f44a2cb4c
checksums.yaml.gz.sig CHANGED
Binary file
@@ -258,7 +258,7 @@ module Protocol
258
258
  # @parameter target [String] the request target.
259
259
  # @parameter version [String] the HTTP version.
260
260
  # @parameter headers [Hash] the HTTP headers.
261
- # @raises [ProtocolError] if the connection is not in the idle state.
261
+ # @raises [RefusedError] if the request was not processed.
262
262
  def write_request(authority, method, target, version, headers)
263
263
  open!
264
264
 
@@ -266,6 +266,8 @@ module Protocol
266
266
  @stream.write("host: #{authority}\r\n") if authority
267
267
 
268
268
  write_headers(headers)
269
+ rescue
270
+ raise ::Protocol::HTTP::RefusedError
269
271
  end
270
272
 
271
273
  # Write a response to the connection. It is expected you will write the body after this method.
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Protocol
7
7
  module HTTP1
8
- VERSION = "0.37.1"
8
+ VERSION = "0.39.0"
9
9
  end
10
10
  end
data/readme.md CHANGED
@@ -30,6 +30,14 @@ Please see the [project documentation](https://socketry.github.io/protocol-http1
30
30
 
31
31
  Please see the [project releases](https://socketry.github.io/protocol-http1/releases/index) for all releases.
32
32
 
33
+ ### v0.39.0
34
+
35
+ - Rename `RequestRefusedError` -\> `RefusedError`.
36
+
37
+ ### v0.38.0
38
+
39
+ - `write_request` now raises `Protocol::HTTP::RequestRefusedError` if the request line or headers cannot be written, indicating the request was not processed and can be safely retried.
40
+
33
41
  ### v0.37.1
34
42
 
35
43
  - Defer `body.close` in `write_chunked_body`, `write_fixed_length_body`, and `write_body_and_close` until after the response is fully written and flushed. Previously, `body.each` called `close` in its `ensure` block before the terminal chunk (chunked encoding) or final flush was written, causing `rack.response_finished` callbacks to delay the client-visible response completion.
@@ -64,15 +72,6 @@ Please see the [project releases](https://socketry.github.io/protocol-http1/rele
64
72
 
65
73
  - Support high-byte characters in HTTP headers for improved international compatibility.
66
74
 
67
- ### v0.32.0
68
-
69
- - Fix header parsing to handle tab characters between values correctly.
70
- - Complete documentation coverage for all public APIs.
71
-
72
- ### v0.31.0
73
-
74
- - Enforce one-way transition for persistent connections to prevent invalid state changes.
75
-
76
75
  ## Contributing
77
76
 
78
77
  We welcome contributions to this project.
data/releases.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Releases
2
2
 
3
+ ## v0.39.0
4
+
5
+ - Rename `RequestRefusedError` -\> `RefusedError`.
6
+
7
+ ## v0.38.0
8
+
9
+ - `write_request` now raises `Protocol::HTTP::RequestRefusedError` if the request line or headers cannot be written, indicating the request was not processed and can be safely retried.
10
+
3
11
  ## v0.37.1
4
12
 
5
13
  - Defer `body.close` in `write_chunked_body`, `write_fixed_length_body`, and `write_body_and_close` until after the response is fully written and flushed. Previously, `body.each` called `close` in its `ensure` block before the terminal chunk (chunked encoding) or final flush was written, causing `rack.response_finished` callbacks to delay the client-visible response completion.
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.37.1
4
+ version: 0.39.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -49,14 +49,14 @@ dependencies:
49
49
  requirements:
50
50
  - - "~>"
51
51
  - !ruby/object:Gem::Version
52
- version: '0.58'
52
+ version: '0.62'
53
53
  type: :runtime
54
54
  prerelease: false
55
55
  version_requirements: !ruby/object:Gem::Requirement
56
56
  requirements:
57
57
  - - "~>"
58
58
  - !ruby/object:Gem::Version
59
- version: '0.58'
59
+ version: '0.62'
60
60
  executables: []
61
61
  extensions: []
62
62
  extra_rdoc_files: []
metadata.gz.sig CHANGED
Binary file