rage-iodine 6.3.0 → 6.5.0
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 +4 -0
- data/ext/iodine/http1.c +18 -6
- data/ext/iodine/scheduler.c +5 -1
- data/lib/iodine/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f31a1e1293d46f952128c7ece15210e0aa556f0cea777d495a7004b1149dc4a3
|
|
4
|
+
data.tar.gz: 92e1058f7c51fd433b63af3ea63615ce9b2db5f6a0d1589575fb3fd4b26379bf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2b8c75f89c3ccb98bced51aa34ac85a1f821c6e7efb99862fddd93e1cb3f99fb860b930552e38c592c1d35d5e8825872a9bc188c45f69a3cf3908fb3d1ad5da1
|
|
7
|
+
data.tar.gz: 10322bd9b0295cebc6d2a84b62eeeebfd17691240d02ba97b71230939c2567b81e0d4a48796639540157b100f730bc2dbf5fdb2fb99541f8966988f49d28e878
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,10 @@ Please notice that this change log contains changes for upcoming releases as wel
|
|
|
6
6
|
|
|
7
7
|
## Changes:
|
|
8
8
|
|
|
9
|
+
#### Change log v.6.4.0 (2026-10-29)
|
|
10
|
+
|
|
11
|
+
**Update**: Avoid disk writes for small chunked request bodies.
|
|
12
|
+
|
|
9
13
|
#### Change log v.6.3.0 (2026-10-23)
|
|
10
14
|
|
|
11
15
|
**Fix**: Fix `rack.input` buffer coderange
|
data/ext/iodine/http1.c
CHANGED
|
@@ -656,15 +656,27 @@ static int http1_on_body_chunk(http1_parser_s *parser, char *data,
|
|
|
656
656
|
http_send_error(&http1_pr2handle(parser2http(parser)), 413);
|
|
657
657
|
return -1; /* test every time, in case of chunked data */
|
|
658
658
|
}
|
|
659
|
+
FIOBJ *body = &http1_pr2handle(parser2http(parser)).body;
|
|
659
660
|
if (!parser->state.read) {
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
661
|
+
*body = fiobj_data_newstr();
|
|
662
|
+
}
|
|
663
|
+
/* Switch to a tmpfile once the body outgrows the threshold */
|
|
664
|
+
intptr_t len = fiobj_data_len(*body);
|
|
665
|
+
if (len <= HTTP_MAX_HEADER_LENGTH &&
|
|
666
|
+
len + (intptr_t)data_len > HTTP_MAX_HEADER_LENGTH) {
|
|
667
|
+
FIOBJ file = fiobj_data_newtmpfile();
|
|
668
|
+
if (!file) {
|
|
669
|
+
http_send_error(&http1_pr2handle(parser2http(parser)), 500);
|
|
670
|
+
return -1;
|
|
671
|
+
}
|
|
672
|
+
if (len) {
|
|
673
|
+
fio_str_info_s mem = fiobj_obj2cstr(*body);
|
|
674
|
+
fiobj_data_write(file, mem.data, mem.len);
|
|
665
675
|
}
|
|
676
|
+
fiobj_free(*body);
|
|
677
|
+
*body = file;
|
|
666
678
|
}
|
|
667
|
-
fiobj_data_write(
|
|
679
|
+
fiobj_data_write(*body, data, data_len);
|
|
668
680
|
return 0;
|
|
669
681
|
}
|
|
670
682
|
|
data/ext/iodine/scheduler.c
CHANGED
|
@@ -26,7 +26,8 @@ Fiber Scheduler API
|
|
|
26
26
|
***************************************************************************** */
|
|
27
27
|
|
|
28
28
|
static void noop(intptr_t uuid, fio_protocol_s *protocol) {
|
|
29
|
-
|
|
29
|
+
/* Scheduler watches are one-shot, including unwanted read events. */
|
|
30
|
+
fio_suspend(uuid);
|
|
30
31
|
(void)protocol;
|
|
31
32
|
}
|
|
32
33
|
|
|
@@ -53,6 +54,9 @@ static void iodine_scheduler_task_close(intptr_t uuid, fio_protocol_s *fio_proto
|
|
|
53
54
|
static void iodine_scheduler_task_perform(intptr_t uuid, fio_protocol_s *fio_protocol) {
|
|
54
55
|
scheduler_protocol_s *protocol = (scheduler_protocol_s *)fio_protocol;
|
|
55
56
|
|
|
57
|
+
/* Suspend before resuming Ruby: it may immediately attach the next wait. */
|
|
58
|
+
fio_suspend(uuid);
|
|
59
|
+
|
|
56
60
|
if (!protocol->fulfilled) {
|
|
57
61
|
IodineCaller.call(protocol->block, call_id);
|
|
58
62
|
protocol->fulfilled = 1;
|
data/lib/iodine/version.rb
CHANGED