async-http 0.94.0 → 0.94.1

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: cebd0cf089e7b487c46236ed346bc623be87e1df32e2649c3c7c16b84879a3bc
4
- data.tar.gz: b1ea789be2df30c902a445af0792395f2d24e36f7f7a42295fd5cb1d4594ef7e
3
+ metadata.gz: c06bf67680cd8dbfad8321b342af311f9a629328552aab879df5f10c4f3c00ba
4
+ data.tar.gz: 87ecb36d0c8ff9de5663ffe0ce278574aa1b52da234c949d842dfa7810676546
5
5
  SHA512:
6
- metadata.gz: 3392b1de050914ec70f2a8698b060878ead385619aeeec7723b6487c79c88d0d376748ba0d1eb93ef78abad04371595656b8617257bddbe62b9da19c8fb78105
7
- data.tar.gz: 44ee15b4f05c0a3f9535f711703f307809748df3d3f5581eb0a1e7700b60991aa2fa23b7fa85c650d7f1e5b1113880b28e11a780a94f48da570ffe665e3ff391
6
+ metadata.gz: b8744dbf85393e9df8f4e0739aa0a76c2063100dda820e4abb06fda4b9a5021d0ca52824fe74cea7fe99095d8cf890fedc6d61d1c1efa3e6442974e420f19167
7
+ data.tar.gz: a3cfc151dd830c6f1dbfef6e630b70704b456aa815a771d3758831b112a7d8a079d0767beaac5f0b7d50dbf409cb3e7b8afdd8e5691b56d2b02cf0fc6412ddcb
checksums.yaml.gz.sig CHANGED
Binary file
@@ -64,21 +64,22 @@ module Async
64
64
  task.annotate("Reading #{self.version} requests for #{self.class}.")
65
65
 
66
66
  while request = next_request
67
- if body = request.body
68
- finishable = Finishable.new(body)
69
- request.body = finishable
70
- end
71
-
72
- response = yield(request, self)
73
- version = request.version
74
- body = response&.body
75
-
76
- if hijacked?
77
- body&.close
78
- return
79
- end
80
-
67
+ # We have received complete request (line + headers), so defer stop until the response is generated.
81
68
  task.defer_stop do
69
+ if body = request.body
70
+ finishable = Finishable.new(body)
71
+ request.body = finishable
72
+ end
73
+
74
+ response = yield(request, self)
75
+ version = request.version
76
+ body = response&.body
77
+
78
+ if hijacked?
79
+ body&.close
80
+ return
81
+ end
82
+
82
83
  # If a response was generated, send it:
83
84
  if response
84
85
  trailer = response.headers.trailer!
@@ -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
  # Copyright, 2020, by Bruno Sutic.
6
6
  # Copyright, 2025, by Jean Boussier.
7
7
 
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2017-2025, by Samuel Williams.
4
+ # Copyright, 2017-2026, by Samuel Williams.
5
5
 
6
6
  module Async
7
7
  module HTTP
8
- VERSION = "0.94.0"
8
+ VERSION = "0.94.1"
9
9
  end
10
10
  end
data/readme.md CHANGED
@@ -16,6 +16,10 @@ Please see the [project documentation](https://socketry.github.io/async-http/) f
16
16
 
17
17
  Please see the [project releases](https://socketry.github.io/async-http/releases/index) for all releases.
18
18
 
19
+ ### v0.94.1
20
+
21
+ - Fix `defer_stop` usage in `HTTP1::Server`, improving server graceful shutdown behavior.
22
+
19
23
  ### v0.94.0
20
24
 
21
25
  - Propagate all errors from background reader to active streams so that they are closed correctly (e.g. errors are not missed).
@@ -52,10 +56,6 @@ Please see the [project releases](https://socketry.github.io/async-http/releases
52
56
 
53
57
  - Minor consistency fixes to `Async::HTTP::Internet` singleton methods.
54
58
 
55
- ### v0.82.0
56
-
57
- - `protocol-http1` introduces a line length limit for request line, response line, header lines and chunk length lines.
58
-
59
59
  ## See Also
60
60
 
61
61
  - [benchmark-http](https://github.com/socketry/benchmark-http) — A benchmarking tool to report on web server concurrency.
data/releases.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Releases
2
2
 
3
+ ## v0.94.1
4
+
5
+ - Fix `defer_stop` usage in `HTTP1::Server`, improving server graceful shutdown behavior.
6
+
3
7
  ## v0.94.0
4
8
 
5
9
  - Propagate all errors from background reader to active streams so that they are closed correctly (e.g. errors are not missed).
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.94.0
4
+ version: 0.94.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file