iodine 0.6.3 → 0.6.4
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 +5 -1
- data/bin/test_with_faye +7 -3
- data/ext/iodine/iodine_http.c +2 -1
- data/ext/iodine/iodine_store.c +3 -0
- data/lib/iodine/connection.rb +2 -0
- data/lib/iodine/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e70dc6f1a44784807a2fe31522003936cd257a324b44d933407c55d64e429721
|
4
|
+
data.tar.gz: cf01d140817c1ceba340047d77e22fbd7e833545360c36810e930105d5788ec2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10b65f02f7aab503d6bad1f5c8f5bcb16347a50a41c069e89059006373fbb9f7a74b9af1ce312c3c5be6a08c2bdb6a6b12da4b52a64c1a90488ad9261c464454
|
7
|
+
data.tar.gz: 72600bd45820eec9145d15cae4a5c7a9db9319116d85ec9e00506a8edf52fb66df95d0e1bbca4dd3afac18dd7dd1e70ba3b7bb707661f0168efec4312491c6ba
|
data/CHANGELOG.md
CHANGED
@@ -6,7 +6,11 @@ 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.6.
|
9
|
+
#### Change log v.0.6.4
|
10
|
+
|
11
|
+
**Fix**: (HTTP/WebSockets) fixed an issue where negative status return values (such as ActionCable's `-1` status code) could cause iodine to assume an abnormal error and shut down the connection. Credit to @mdesantis (Maurizio De Santis) for opening issue #38.
|
12
|
+
|
13
|
+
#### Change log v.0.6.3
|
10
14
|
|
11
15
|
**Fix**: (WebSockets) fixed an issue where WebSocket message events would attempt to create a String object outside the GVL.
|
12
16
|
|
data/bin/test_with_faye
CHANGED
@@ -13,7 +13,7 @@ $LOAD_PATH.unshift File.expand_path(File.join('..', '..', 'lib'), __FILE__)
|
|
13
13
|
require 'bundler/setup'
|
14
14
|
require 'iodine'
|
15
15
|
|
16
|
-
|
16
|
+
APP = lambda do |env|
|
17
17
|
if Faye::WebSocket.websocket?(env)
|
18
18
|
ws = Faye::WebSocket.new(env)
|
19
19
|
|
@@ -27,14 +27,18 @@ Iodine::Rack.app = lambda do |env|
|
|
27
27
|
end
|
28
28
|
|
29
29
|
# Return async Rack response
|
30
|
-
|
31
|
-
|
30
|
+
response = ws.rack_response
|
31
|
+
p response
|
32
|
+
response
|
32
33
|
else
|
33
34
|
# Normal HTTP request
|
34
35
|
[200, { 'Content-Type' => 'text/plain' }, ["Hello\n"]]
|
35
36
|
end
|
36
37
|
end
|
37
38
|
|
39
|
+
Iodine.listen2http app: APP
|
40
|
+
|
41
|
+
Iodine.threads = 4
|
38
42
|
Iodine.start
|
39
43
|
|
40
44
|
# ws = new WebSocket("ws://localhost:3000"); ws.onmessage = function(e) {console.log("Got message!"); console.log(e.data);}; ws.onclose = function(e) {console.log("closed")}; ws.onopen = function(e) {ws.send("hi");};
|
data/ext/iodine/iodine_http.c
CHANGED
@@ -683,7 +683,8 @@ static inline void *iodine_handle_request_in_GVL(void *handle_) {
|
|
683
683
|
// review each header and write it to the response.
|
684
684
|
rb_hash_foreach(response_headers, for_each_header_data, (VALUE)(h));
|
685
685
|
// review for upgrade.
|
686
|
-
if (h->status < 300 &&
|
686
|
+
if ((intptr_t)h->status < 300 &&
|
687
|
+
ruby2c_review_upgrade(handle, rbresponse, env))
|
687
688
|
goto external_done;
|
688
689
|
// send the request body.
|
689
690
|
if (ruby2c_response_send(handle, rbresponse, env))
|
data/ext/iodine/iodine_store.c
CHANGED
data/lib/iodine/connection.rb
CHANGED
@@ -26,6 +26,8 @@ module Iodine
|
|
26
26
|
# def on_drained client
|
27
27
|
# client.is_a?(Iodine::Connection) # => true
|
28
28
|
# end
|
29
|
+
# # Allows the module to be used as a static callback object (avoiding object allocation)
|
30
|
+
# extend self
|
29
31
|
# end
|
30
32
|
#
|
31
33
|
# All connection related actions can be performed using the methods provided through this class.
|
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.6.
|
4
|
+
version: 0.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boaz Segev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|