rage-iodine 5.1.0 → 5.2.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 +4 -4
- data/CHANGELOG.md +14 -0
- data/ext/iodine/http1.c +5 -1
- data/ext/iodine/iodine_http.c +7 -6
- data/lib/iodine/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9fd3a793cbda970225d2c5415e74b438c0fcd29fffed9380705af893eae785b8
|
|
4
|
+
data.tar.gz: 872fef65c93df27c11f97b82d34a80932409902c774d53b08946ac9b2ea10af6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f34b8c05ff937fbf455264fa1c99dc4b8c59d7091d18eeb3c5624f06141ef8643d57f9b245b951ca3e4fcbf10e414166ef9404ccde2c8b2f01036b6b1a2e6804
|
|
7
|
+
data.tar.gz: 89b3403962bebfbf04194e81c998b86c70caf39302d2c4fe83f87532b95b25418508ebe81238d2816f8324f65b14f332f4ec24ac3a414c723a9be20c4cff1642
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,20 @@ Please notice that this change log contains changes for upcoming releases as wel
|
|
|
6
6
|
|
|
7
7
|
## Changes:
|
|
8
8
|
|
|
9
|
+
#### Change log v.5.2.1 (2026-03-18)
|
|
10
|
+
|
|
11
|
+
**Fix**: Fix memory leak when setting `x-accel-buffering` header
|
|
12
|
+
|
|
13
|
+
**Fix**: Fix memory leak with async SSE flows
|
|
14
|
+
|
|
15
|
+
#### Change log v.5.2.0 (2026-03-10)
|
|
16
|
+
|
|
17
|
+
**Update**: Skip connection validity check when closing SSE connections
|
|
18
|
+
|
|
19
|
+
**Update**: Stop setting content-type header for SSE requests
|
|
20
|
+
|
|
21
|
+
**Update**: Set `x-accel-buffering` for SSE requests
|
|
22
|
+
|
|
9
23
|
#### Change log v.5.1.0 (2026-03-04)
|
|
10
24
|
|
|
11
25
|
**Update**: Verify SSE connection are open before calling the protocol object
|
data/ext/iodine/http1.c
CHANGED
|
@@ -465,11 +465,15 @@ static int http1_upgrade2sse(http_s *h, http_sse_s *sse) {
|
|
|
465
465
|
const intptr_t uuid = handle2pr(h)->p.uuid;
|
|
466
466
|
/* send response */
|
|
467
467
|
h->status = 200;
|
|
468
|
-
http_set_header(h, HTTP_HEADER_CONTENT_TYPE, fiobj_dup(HTTP_HVALUE_SSE_MIME));
|
|
469
468
|
http_set_header(h, HTTP_HEADER_CACHE_CONTROL,
|
|
470
469
|
fiobj_dup(HTTP_HVALUE_NO_CACHE));
|
|
471
470
|
http_set_header(h, HTTP_HEADER_CONTENT_ENCODING,
|
|
472
471
|
fiobj_str_new("identity", 8));
|
|
472
|
+
{
|
|
473
|
+
FIOBJ x_accel_key = fiobj_str_new("x-accel-buffering", 17);
|
|
474
|
+
http_set_header(h, x_accel_key, fiobj_str_new("no", 2));
|
|
475
|
+
fiobj_free(x_accel_key);
|
|
476
|
+
}
|
|
473
477
|
handle2pr(h)->stop = 1;
|
|
474
478
|
htt1p_finish(h); /* avoid the enforced content length in http_finish */
|
|
475
479
|
|
data/ext/iodine/iodine_http.c
CHANGED
|
@@ -227,10 +227,6 @@ static void iodine_sse_on_shutdown(http_sse_s *sse) {
|
|
|
227
227
|
Qnil);
|
|
228
228
|
}
|
|
229
229
|
static void iodine_sse_on_close(http_sse_s *sse) {
|
|
230
|
-
if (http_sse2uuid(sse) == -1) {
|
|
231
|
-
// Connection was already closed, skip silently
|
|
232
|
-
return;
|
|
233
|
-
}
|
|
234
230
|
iodine_connection_fire_event((VALUE)sse->udata, IODINE_CONNECTION_ON_CLOSE,
|
|
235
231
|
Qnil);
|
|
236
232
|
}
|
|
@@ -813,6 +809,11 @@ iodine_perform_handle_action(iodine_http_request_handle_s handle) {
|
|
|
813
809
|
|
|
814
810
|
// gets called by `http_resume`
|
|
815
811
|
static inline void http_resume_deferred_request_handler(http_s *h) {
|
|
812
|
+
// Save these before `iodine_handle_request_in_GVL`, because
|
|
813
|
+
// SSE/WebSocket upgrades invalidate the `http_s` struct
|
|
814
|
+
VALUE fiber = (VALUE)h->fiber;
|
|
815
|
+
subscription_s *subscription = (subscription_s *)h->subscription;
|
|
816
|
+
|
|
816
817
|
iodine_http_request_handle_s handle = (iodine_http_request_handle_s){
|
|
817
818
|
.h = h,
|
|
818
819
|
.type = IODINE_HTTP_DEFERRED,
|
|
@@ -821,8 +822,8 @@ static inline void http_resume_deferred_request_handler(http_s *h) {
|
|
|
821
822
|
IodineCaller.enterGVL((void *(*)(void *))iodine_handle_request_in_GVL,
|
|
822
823
|
&handle);
|
|
823
824
|
|
|
824
|
-
fio_unsubscribe(
|
|
825
|
-
IodineStore.remove(
|
|
825
|
+
fio_unsubscribe(subscription);
|
|
826
|
+
IodineStore.remove(fiber);
|
|
826
827
|
|
|
827
828
|
iodine_perform_handle_action(handle);
|
|
828
829
|
}
|
data/lib/iodine/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rage-iodine
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.1
|
|
4
|
+
version: 5.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Boaz Segev
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-03-
|
|
10
|
+
date: 2026-03-18 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: rake
|