rage-iodine 6.2.0 → 6.4.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 +8 -0
- data/ext/iodine/http1.c +18 -6
- data/ext/iodine/iodine_rack_io.c +1 -0
- 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: 209fcf94b4cec12ccef647a0463a2256919859ab012e724f89ef6bbb60aea7e7
|
|
4
|
+
data.tar.gz: c8ff6f19d0228ac11f485cc8b6c1edd85a132ae7a3ab94a8e7da8909ee103440
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 02e9552071a7f52674c564595ce4e315ab41dc40b4b0a858d6a092e11ec69a4ed5a370e0ffda2028b2fdaa99217966da276425b8b9965faec58f12e75453a5a0
|
|
7
|
+
data.tar.gz: 1978be98f2912cde1b2c6a97483caee8118f795fcb3a22180b8a57c87e3138a31ed085dcd19d4589bb171f7bfd23d8fe649e1b3fc01f6f7907b00e86c7fe13db
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,14 @@ 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
|
+
|
|
13
|
+
#### Change log v.6.3.0 (2026-10-23)
|
|
14
|
+
|
|
15
|
+
**Fix**: Fix `rack.input` buffer coderange
|
|
16
|
+
|
|
9
17
|
#### Change log v.5.9.0/v.6.2.0 (2026-10-15)
|
|
10
18
|
|
|
11
19
|
**Fix**: Prevent process hang on exit caused by a use-after-free in pub/sub teardown (`fio_cluster_at_exit` read a channel freed by `fio_unsubscribe` of its last subscription; it now performs a bounded best-effort cleanup instead). See #21.
|
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/iodine_rack_io.c
CHANGED
|
@@ -146,6 +146,7 @@ static VALUE rio_read(int argc, VALUE *argv, VALUE self) {
|
|
|
146
146
|
} else {
|
|
147
147
|
// make sure the buffer is binary encoded.
|
|
148
148
|
rb_enc_associate(buffer, IodineBinaryEncoding);
|
|
149
|
+
rb_str_modify(buffer);
|
|
149
150
|
if (rb_str_capacity(buffer) < (size_t)buf.len)
|
|
150
151
|
rb_str_resize(buffer, buf.len);
|
|
151
152
|
memcpy(RSTRING_PTR(buffer), buf.data, buf.len);
|
data/lib/iodine/version.rb
CHANGED