async-http 0.93.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/async/http/protocol/http1/server.rb +15 -14
- data/lib/async/http/protocol/http2/connection.rb +2 -8
- data/lib/async/http/server.rb +0 -3
- data/lib/async/http/version.rb +2 -2
- data/readme.md +8 -8
- data/releases.md +8 -0
- data.tar.gz.sig +2 -2
- metadata +1 -1
- 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: 9e47e3773a940f0a7218dacb8f188531c1d5d42a12ad4708688011953135a6b1
|
|
4
|
+
data.tar.gz: 9cb9fa6ca50c1a31ca46f1c9bad7e678ae2bd78d041ae839714e92832e5b1fec
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
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-
|
|
4
|
+
# Copyright, 2018-2026, by Samuel Williams.
|
|
5
5
|
# Copyright, 2020, by Bruno Sutic.
|
|
6
6
|
# Copyright, 2025, by Jean Boussier.
|
|
7
7
|
|
|
@@ -91,14 +91,8 @@ module Async
|
|
|
91
91
|
self.consume_window
|
|
92
92
|
self.read_frame
|
|
93
93
|
end
|
|
94
|
-
rescue Async::Stop, ::IO::TimeoutError, ::Protocol::HTTP2::GoawayError => error
|
|
95
|
-
# Error is raised if a response is actively reading from the
|
|
96
|
-
# connection. The connection is silently closed if GOAWAY is
|
|
97
|
-
# received outside the request/response cycle.
|
|
98
|
-
rescue SocketError, IOError, EOFError, Errno::ECONNRESET, Errno::EPIPE
|
|
99
|
-
# Ignore.
|
|
100
94
|
rescue => error
|
|
101
|
-
#
|
|
95
|
+
# Close with error.
|
|
102
96
|
ensure
|
|
103
97
|
# Don't call #close twice.
|
|
104
98
|
if @reader
|
data/lib/async/http/server.rb
CHANGED
data/lib/async/http/version.rb
CHANGED
data/readme.md
CHANGED
|
@@ -16,6 +16,14 @@ 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
|
+
|
|
23
|
+
### v0.94.0
|
|
24
|
+
|
|
25
|
+
- Propagate all errors from background reader to active streams so that they are closed correctly (e.g. errors are not missed).
|
|
26
|
+
|
|
19
27
|
### v0.92.2
|
|
20
28
|
|
|
21
29
|
- Better handling of trailers. If invalid trailers are received, the connection (HTTP/1) or stream (HTTP/2) is reset.
|
|
@@ -48,14 +56,6 @@ Please see the [project releases](https://socketry.github.io/async-http/releases
|
|
|
48
56
|
|
|
49
57
|
- Minor consistency fixes to `Async::HTTP::Internet` singleton methods.
|
|
50
58
|
|
|
51
|
-
### v0.82.0
|
|
52
|
-
|
|
53
|
-
- `protocol-http1` introduces a line length limit for request line, response line, header lines and chunk length lines.
|
|
54
|
-
|
|
55
|
-
### v0.81.0
|
|
56
|
-
|
|
57
|
-
- Expose `protocol` and `endpoint` as tags to `async-pool` for improved instrumentation.
|
|
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,13 @@
|
|
|
1
1
|
# Releases
|
|
2
2
|
|
|
3
|
+
## v0.94.1
|
|
4
|
+
|
|
5
|
+
- Fix `defer_stop` usage in `HTTP1::Server`, improving server graceful shutdown behavior.
|
|
6
|
+
|
|
7
|
+
## v0.94.0
|
|
8
|
+
|
|
9
|
+
- Propagate all errors from background reader to active streams so that they are closed correctly (e.g. errors are not missed).
|
|
10
|
+
|
|
3
11
|
## v0.92.2
|
|
4
12
|
|
|
5
13
|
- Better handling of trailers. If invalid trailers are received, the connection (HTTP/1) or stream (HTTP/2) is reset.
|
data.tar.gz.sig
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
dr�ϵ5��@f��5L�3���@�5���/�����v ǸiY�n�2�-����y���@�4+�v�[�T���~`�'��r����WX�2�k��XY�W�fX/���?��6X���~蘙�@|��� R}�+��C�*�ɧ��I�vT�m,
|
|
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
metadata.gz.sig
CHANGED
|
Binary file
|