iodine 0.7.28 → 0.7.29

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of iodine might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b76690963cd5e669bee41bd2859f60164c3a9ce4dbcc56706864fe05ce5db049
4
- data.tar.gz: cebe9da9b5206d2229e1ecefac594c26ffb548e0ff25aefba5429f0724e8a97f
3
+ metadata.gz: e99acc46ab75628917f405a1ef7aa08c38434f03b0210b2fd1300ddbf4cf5874
4
+ data.tar.gz: 05a8b2b8bcddebcb85f61257e9ab9aa762a72afba0f7b4dc569e32d1a97ebeb6
5
5
  SHA512:
6
- metadata.gz: d9799ff98973047f253fafedcb3f5dc70b2e7f04409c0eb415093e1d984eea3996f6b2cd7ee2dc87fbdacd94653a95299857f4bae5146188c91e9a656add6b36
7
- data.tar.gz: f422ac357af80a1a60a5ffe4940cf25afce4132aae41aae9f94048f8e6250e43b1d0aca09bedf4f9dbc1e7f733f5b7c6c3fab12d5fe4ef6cbaa48d4923196554
6
+ metadata.gz: bb038db0614b5c2bbda474c3c5ce25ba14ec0e70990ef799532754340842cec8aec44e52c8b3d93eec76a5d10e055948c0f3d8a5ee9eee92bf18449b8ef49f60
7
+ data.tar.gz: d5c078cf9d5a30d2f35c34935bb24a556c65680642c269544730cc420971de12eb90b8497303b4dfd6d971e8d9b22399a37bb21b85d804fecdf49f922b123772
@@ -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.0.7.29
10
+
11
+ **Fix**: fixed an issue where `env['rack.input'].read(nil, nil)` would return `nil` instead of `""` on zero-content requests (i.e., an empty POST request). Credit to @thexa4 (Max Maton) for exposing this issue and providing a POC for debugging (issue #71).
12
+
9
13
  #### Change log v.0.7.28
10
14
 
11
15
  **Fix**: fixed an issue where iodine would crush (or hang) if unprotected exceptions were raised within a response body's `each` loop. This also fixes Fiber support when streaming with Roda (note: iodine will concat the body in a buffer before sending it). Credit to @adam12 (Adam Daniels) both for exposing the issue (#70) and testing possible solutions.
@@ -5101,17 +5101,21 @@ typedef enum fio_cluster_message_type_e {
5101
5101
 
5102
5102
  typedef struct fio_collection_s fio_collection_s;
5103
5103
 
5104
- #pragma pack(1)
5104
+ #ifndef __clang__ /* clang might misbehave by assumming non-alignment */
5105
+ #pragma pack(1) /* https://gitter.im/halide/Halide/archives/2018/07/24 */
5106
+ #endif
5105
5107
  typedef struct {
5106
5108
  size_t name_len;
5107
5109
  char *name;
5108
- size_t ref;
5110
+ volatile size_t ref;
5109
5111
  fio_ls_embd_s subscriptions;
5110
5112
  fio_collection_s *parent;
5111
5113
  fio_match_fn match;
5112
5114
  fio_lock_i lock;
5113
5115
  } channel_s;
5116
+ #ifndef __clang__
5114
5117
  #pragma pack()
5118
+ #endif
5115
5119
 
5116
5120
  struct subscription_s {
5117
5121
  fio_ls_embd_s node;
@@ -111,12 +111,13 @@ static VALUE rio_gets(VALUE self) {
111
111
  // Reads data from the IO, according to the Rack specifications for `#read`.
112
112
  static VALUE rio_read(int argc, VALUE *argv, VALUE self) {
113
113
  FIOBJ io = get_data(self);
114
- if (!FIOBJ_TYPE_IS(io, FIOBJ_T_DATA))
115
- return Qnil;
116
-
117
114
  VALUE buffer = Qnil;
118
- char ret_nil = 0;
115
+ uint8_t ret_nil = 0;
119
116
  ssize_t len = 0;
117
+ if (!FIOBJ_TYPE_IS(io, FIOBJ_T_DATA)) {
118
+ return (argc > 0 && argv[0] != Qnil) ? Qnil : rb_str_buf_new(0);
119
+ }
120
+
120
121
  // get the buffer object if given
121
122
  if (argc == 2) {
122
123
  Check_Type(argv[1], T_STRING);
@@ -149,10 +150,7 @@ static VALUE rio_read(int argc, VALUE *argv, VALUE self) {
149
150
  }
150
151
  return buffer;
151
152
  }
152
- if (ret_nil)
153
- return Qnil;
154
- else
155
- return rb_str_buf_new(0);
153
+ return ret_nil ? Qnil : rb_str_buf_new(0);
156
154
  }
157
155
 
158
156
  // Does nothing - this is controlled by the server.
@@ -1,3 +1,3 @@
1
1
  module Iodine
2
- VERSION = '0.7.28'.freeze
2
+ VERSION = '0.7.29'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iodine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.28
4
+ version: 0.7.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boaz Segev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-30 00:00:00.000000000 Z
11
+ date: 2019-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -202,7 +202,7 @@ licenses:
202
202
  - MIT
203
203
  metadata:
204
204
  allowed_push_host: https://rubygems.org
205
- post_install_message: 'Thank you for installing Iodine 0.7.28.
205
+ post_install_message: 'Thank you for installing Iodine 0.7.29.
206
206
 
207
207
  '
208
208
  rdoc_options: []