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 +4 -4
- data/CHANGELOG.md +4 -0
- data/ext/iodine/fio.c +6 -2
- data/ext/iodine/iodine_rack_io.c +6 -8
- data/lib/iodine/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e99acc46ab75628917f405a1ef7aa08c38434f03b0210b2fd1300ddbf4cf5874
|
4
|
+
data.tar.gz: 05a8b2b8bcddebcb85f61257e9ab9aa762a72afba0f7b4dc569e32d1a97ebeb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb038db0614b5c2bbda474c3c5ce25ba14ec0e70990ef799532754340842cec8aec44e52c8b3d93eec76a5d10e055948c0f3d8a5ee9eee92bf18449b8ef49f60
|
7
|
+
data.tar.gz: d5c078cf9d5a30d2f35c34935bb24a556c65680642c269544730cc420971de12eb90b8497303b4dfd6d971e8d9b22399a37bb21b85d804fecdf49f922b123772
|
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.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.
|
data/ext/iodine/fio.c
CHANGED
@@ -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
|
-
#
|
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;
|
data/ext/iodine/iodine_rack_io.c
CHANGED
@@ -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
|
-
|
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
|
-
|
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.
|
data/lib/iodine/version.rb
CHANGED
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.
|
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-
|
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.
|
205
|
+
post_install_message: 'Thank you for installing Iodine 0.7.29.
|
206
206
|
|
207
207
|
'
|
208
208
|
rdoc_options: []
|