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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e296131738e4dd072f1708da46957d66d78634792bd92f7162bdf3e49b222421
4
- data.tar.gz: cbe8892dad5781565df04fce249acdcda2a050d3ccbb30218c41202704deee9a
3
+ metadata.gz: 7e2925f48b74a97ff3431fc421ebd451c1f8d4befd701ac454ceb0bb8ed2ae82
4
+ data.tar.gz: 6c101cf70146f67794adc91ca9eee8cfade412b27bbed04d2c9937e378f25fa8
5
5
  SHA512:
6
- metadata.gz: bcdc806d2ef25fd4ed32d12cf6348220de5a242d26f69e3b97375e2dd988397d348c1e0ca8f86328fec0eac065081d880f9842b56a9c5e7f4086cb07af69b2b6
7
- data.tar.gz: 65c3066177011062277f25a685644063e416b84ebba6f8d90080ac37be01eda37ade06a1a20721b2293e950253052bdac8e49e5484932857a2265c9c80293d37
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, IodineBinaryEncoding);
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, IodineBinaryEncoding);
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
  /* *****************************************************************************
@@ -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 = rb_str_new(str, len);
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 = rb_str_new(NULL, 0);
293
+ value = rb_enc_str_new(NULL, 0, IodineUTF8Encoding);
294
294
  } else {
295
295
  value = Qnil;
296
296
  }
@@ -1,3 +1,3 @@
1
1
  module Iodine
2
- VERSION = '5.7.0'.freeze
2
+ VERSION = '5.8.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rage-iodine
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.7.0
4
+ version: 5.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boaz Segev