rage-iodine 5.7.0 → 5.8.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/http.c +4 -2
- data/ext/iodine/iodine_helpers.c +2 -2
- 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: 7e2925f48b74a97ff3431fc421ebd451c1f8d4befd701ac454ceb0bb8ed2ae82
|
|
4
|
+
data.tar.gz: 6c101cf70146f67794adc91ca9eee8cfade412b27bbed04d2c9937e378f25fa8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bcfba0ed6461dad2478e3f35b1dc2246046d872b6159bac5f93651f7ce3fa74ef2ee86e90727e930bb48514a7266844d9eb616af253f2aef30d92646b65fe06b
|
|
7
|
+
data.tar.gz: 2c1fa87406f4f249551addeb72d59231684552bdc5fde2ed55539851afe9b14349497f7cc8e0dfa1969f71668e24b93d1cc591cc5a2e3d560e2b4abd67e56c7b
|
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.5.8.0 (2026-10-09)
|
|
10
|
+
|
|
11
|
+
**Update**: Encode parameters as UTF-8
|
|
12
|
+
|
|
9
13
|
#### Change log v.5.7.0 (2026-10-04)
|
|
10
14
|
|
|
11
15
|
**Update**: Refactor parameters parsing
|
data/ext/iodine/http.c
CHANGED
|
@@ -68,6 +68,7 @@ static VALUE cUploadedFile;
|
|
|
68
68
|
static ID create_id;
|
|
69
69
|
static ID path_id;
|
|
70
70
|
static rb_encoding *IodineBinaryEncoding;
|
|
71
|
+
static rb_encoding *IodineUTF8Encoding;
|
|
71
72
|
|
|
72
73
|
/* *****************************************************************************
|
|
73
74
|
Small Helpers
|
|
@@ -2010,7 +2011,7 @@ static void http_mime_parser_on_data(http_mime_parser_s *parser, void *name,
|
|
|
2010
2011
|
size_t value_len) {
|
|
2011
2012
|
// for regular values - just add them to params
|
|
2012
2013
|
if (!filename_len) {
|
|
2013
|
-
VALUE r_value = rb_enc_str_new(value, value_len,
|
|
2014
|
+
VALUE r_value = rb_enc_str_new(value, value_len, IodineUTF8Encoding);
|
|
2014
2015
|
http_add_to_params(http_mime_parser2fio(parser)->params, name, name_len, r_value);
|
|
2015
2016
|
return;
|
|
2016
2017
|
}
|
|
@@ -2085,7 +2086,7 @@ static void http_mime_parser_on_partial_end(http_mime_parser_s *parser) {
|
|
|
2085
2086
|
|
|
2086
2087
|
FIOBJ slice = fiobj_data_slice(fio_parser->h->body, fio_parser->partial_offset, fio_parser->partial_length);
|
|
2087
2088
|
fio_str_info_s s_slice = fiobj_obj2cstr(slice);
|
|
2088
|
-
VALUE r_value = rb_enc_str_new(s_slice.data, s_slice.len,
|
|
2089
|
+
VALUE r_value = rb_enc_str_new(s_slice.data, s_slice.len, IodineUTF8Encoding);
|
|
2089
2090
|
http_add_to_params(fio_parser->params, RSTRING_PTR(fio_parser->partial_name), RSTRING_LEN(fio_parser->partial_name), r_value);
|
|
2090
2091
|
|
|
2091
2092
|
fio_parser->partial_name = Qnil;
|
|
@@ -2701,6 +2702,7 @@ void http_init(void) {
|
|
|
2701
2702
|
path_id = rb_intern("path");
|
|
2702
2703
|
|
|
2703
2704
|
IodineBinaryEncoding = rb_enc_find("binary");
|
|
2705
|
+
IodineUTF8Encoding = rb_enc_find("UTF-8");
|
|
2704
2706
|
}
|
|
2705
2707
|
|
|
2706
2708
|
/* *****************************************************************************
|
data/ext/iodine/iodine_helpers.c
CHANGED
|
@@ -242,7 +242,7 @@ Convert query string into a Ruby object without recursion.
|
|
|
242
242
|
*/
|
|
243
243
|
static VALUE build_query_component(char *str, size_t len,
|
|
244
244
|
uint8_t should_decode) {
|
|
245
|
-
VALUE result =
|
|
245
|
+
VALUE result = rb_enc_str_new(str, len, IodineUTF8Encoding);
|
|
246
246
|
if (should_decode) {
|
|
247
247
|
url_decode_inplace(Qnil, result);
|
|
248
248
|
}
|
|
@@ -290,7 +290,7 @@ static VALUE parse_nested_query_internal(char *str, size_t len) {
|
|
|
290
290
|
pair_end - separator - 1,
|
|
291
291
|
value_should_decode);
|
|
292
292
|
} else if (key_len > 1 && memchr(key_data + 1, '[', key_len - 1)) {
|
|
293
|
-
value =
|
|
293
|
+
value = rb_enc_str_new(NULL, 0, IodineUTF8Encoding);
|
|
294
294
|
} else {
|
|
295
295
|
value = Qnil;
|
|
296
296
|
}
|
data/lib/iodine/version.rb
CHANGED