rage-iodine 5.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7be7852385079072038ac11985d101e7b05b4a179d9cca4d9714b5259b2e7976
4
- data.tar.gz: 89cfe5691372d27ea1cc2093fa9f47e11b86011013b453a23c90371e7849e4c5
3
+ metadata.gz: 9fd3a793cbda970225d2c5415e74b438c0fcd29fffed9380705af893eae785b8
4
+ data.tar.gz: 872fef65c93df27c11f97b82d34a80932409902c774d53b08946ac9b2ea10af6
5
5
  SHA512:
6
- metadata.gz: ffadced84f5141ee01debbb951cf7313d9c1f8fda94db7cec4512c717dd6f71c43d0f5e6375c3a736cc1f5c36820db530397c01196aac9e727c0ee47c95ed832
7
- data.tar.gz: 7cdf3c7c92c855dcb6f07b8063134f6c537f63e4f28bdab4a7b6e58911969c4f069a3d52f3d74ded830bd49a57033bc2fa6e33c77b5ffa1cbdda9d90c7b7307c
6
+ metadata.gz: f34b8c05ff937fbf455264fa1c99dc4b8c59d7091d18eeb3c5624f06141ef8643d57f9b245b951ca3e4fcbf10e414166ef9404ccde2c8b2f01036b6b1a2e6804
7
+ data.tar.gz: 89b3403962bebfbf04194e81c998b86c70caf39302d2c4fe83f87532b95b25418508ebe81238d2816f8324f65b14f332f4ec24ac3a414c723a9be20c4cff1642
data/CHANGELOG.md CHANGED
@@ -6,6 +6,12 @@ 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
+
9
15
  #### Change log v.5.2.0 (2026-03-10)
10
16
 
11
17
  **Update**: Skip connection validity check when closing SSE connections
data/ext/iodine/http1.c CHANGED
@@ -469,8 +469,11 @@ static int http1_upgrade2sse(http_s *h, http_sse_s *sse) {
469
469
  fiobj_dup(HTTP_HVALUE_NO_CACHE));
470
470
  http_set_header(h, HTTP_HEADER_CONTENT_ENCODING,
471
471
  fiobj_str_new("identity", 8));
472
- http_set_header(h, fiobj_str_new("x-accel-buffering", 17),
473
- fiobj_str_new("no", 2));
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
+ }
474
477
  handle2pr(h)->stop = 1;
475
478
  htt1p_finish(h); /* avoid the enforced content length in http_finish */
476
479
 
@@ -809,6 +809,11 @@ iodine_perform_handle_action(iodine_http_request_handle_s handle) {
809
809
 
810
810
  // gets called by `http_resume`
811
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
+
812
817
  iodine_http_request_handle_s handle = (iodine_http_request_handle_s){
813
818
  .h = h,
814
819
  .type = IODINE_HTTP_DEFERRED,
@@ -817,8 +822,8 @@ static inline void http_resume_deferred_request_handler(http_s *h) {
817
822
  IodineCaller.enterGVL((void *(*)(void *))iodine_handle_request_in_GVL,
818
823
  &handle);
819
824
 
820
- fio_unsubscribe((subscription_s *)h->subscription);
821
- IodineStore.remove((VALUE)h->fiber);
825
+ fio_unsubscribe(subscription);
826
+ IodineStore.remove(fiber);
822
827
 
823
828
  iodine_perform_handle_action(handle);
824
829
  }
@@ -1,3 +1,3 @@
1
1
  module Iodine
2
- VERSION = '5.2.0'.freeze
2
+ VERSION = '5.2.1'.freeze
3
3
  end
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.2.0
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 00:00:00.000000000 Z
10
+ date: 2026-03-18 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rake