async-http 0.94.0 → 0.94.2

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: 9e47e3773a940f0a7218dacb8f188531c1d5d42a12ad4708688011953135a6b1
4
+ data.tar.gz: 9cb9fa6ca50c1a31ca46f1c9bad7e678ae2bd78d041ae839714e92832e5b1fec
5
5
  SHA512:
6
- metadata.gz: 3392b1de050914ec70f2a8698b060878ead385619aeeec7723b6487c79c88d0d376748ba0d1eb93ef78abad04371595656b8617257bddbe62b9da19c8fb78105
7
- data.tar.gz: 44ee15b4f05c0a3f9535f711703f307809748df3d3f5581eb0a1e7700b60991aa2fa23b7fa85c650d7f1e5b1113880b28e11a780a94f48da570ffe665e3ff391
6
+ metadata.gz: aaa2d45e58a66255a71ab802e5a4706d8c09ac85665e7004c5c06e91bc38cc919f18229b5670e411df13364e09ad243bf8d45c3d68a361ad8653861f2527a8cb
7
+ data.tar.gz: 16a4894930c5a3ce0611de7b4840aecf9d050b9de59e8dc0da2b0803978bbd47933f9066850c7d0d596f1f6ed609047f31007b742ea2d822fd8b36499580dfb0
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
 
@@ -67,9 +67,6 @@ module Async
67
67
 
68
68
  # Wait for all children to finish:
69
69
  task.children.each(&:wait)
70
- ensure
71
- # Stop all children (accept loops) on exit:
72
- task.children.each(&:stop)
73
70
  end
74
71
  end
75
72
  end
@@ -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.2"
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
@@ -1,2 +1,2 @@
1
-
2
- �maŵpjP&<�� U� �DWؘ`��$J=�O=/��2~�H9uQ��q��\Xju� ��o|>�l�b�:^�9��*;zr��D+"����[|x2������m��z�W�%TA��y"���kV��ä�;n\�h� ���ݕ�#��CEv�.�W;�s�$����˲Y��T�DȅL�b�$#_����]��;,J>M�u����?��o�Ӕ���V$wp
1
+ Jkq�����h��Z=���cۯL�#Fɛs*8n��Q�r�\�/#��O���B��rr����gN�Z��ɶ�ߒ��7)|%<���v.5�t%�����d`�������<Oaq�=���{^8�t��r�6;�ߢ=��ѷO�c�}�����-����1�[c)�
3
2
  VE�f�6��#�X:¢�+��Sv����a�Ae��W%��Kȭh'(%���Rf�h�����z�����nz�rtrd�*�j���r�cw*�
3
+ �Mt�Q�߽�9�R�a�v�9��p|�1�
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.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file