iodine 0.1.3 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 52b6a918e31cf2734100dca991e1641bc8b41363
4
- data.tar.gz: df5c3697673f57ddb4917b86a883438618f8ff9b
3
+ metadata.gz: 1b7b0693d39f0937c97786d6070a972dfdadbefb
4
+ data.tar.gz: 9392682f01bd3f81f77ce6f4397aeef61df33ad5
5
5
  SHA512:
6
- metadata.gz: 246d8001e1a4866ce2c0e77b616b2eb7cb06f52b4a2d63c701b0c0a4cd15cc4faebb6b81ec3f82a546e88a42dec631b6468112107bdd01fe1722d54b2d89679b
7
- data.tar.gz: cc87fe1ba30eb7d121e98343bbfa2452a620b52ba5fe5cb607d7c9d978f8b391056e61c5ebaec999cff714e75f7815f3148cf5e3c26488a033637298120695b1
6
+ metadata.gz: c3cf5a23ae4547f126d11523a8926f974f602bf033a0e34012bd342559ada37701e5b6beb91e26c5a044083621d53e0187c87bd49ba66d2edb180642b8cc3a76
7
+ data.tar.gz: e9e14352d3460fdae6d1823b8e5f8a45a61dbb2b28cb0cf92e8f4eadb95000f3d2bb9a5d742b0312371003cde1fa698b202b1abcc2c6ede3b68e511e677c0a9e
@@ -8,6 +8,16 @@ Please notice that this change log contains changes for upcoming releases as wel
8
8
 
9
9
  ***
10
10
 
11
+ Change log v.0.1.4
12
+
13
+ **Fix**: fixed an issue with where the WebsocketClient#on_close wouldn't be called for a renewable Websocket connection during shutdown.
14
+
15
+ **Fix**: fixed an issue where a protocol's #on_close callback wouldn't be called if the Iodine server receives a shutdown signal.
16
+
17
+ **Fix**: fixed an issue where Http2 header size limit condition was not recognized by the Ruby parser (a double space issue, might be an issue with the 2.2.3 Ruby parser).
18
+
19
+ ***
20
+
11
21
  Change log v.0.1.3
12
22
 
13
23
  **Fix**: fixed an issue with the new form/multipart parser, where the '+' sign would be converted to spaces on form fields (not uploaded files), causing inadvert potential change to the original POSTed data.
@@ -293,7 +293,7 @@ module Iodine
293
293
  frame[:stream][:headers_size] ||= 0
294
294
  frame[:stream][:headers_size] += frame[:body].bytesize
295
295
 
296
- return (Iodine.warn('Http2 header overloading, closing connection.') && connection_error( ENHANCE_YOUR_CALM ) ) if frame[:stream][:headers_size] >  262_144
296
+ return (Iodine.warn('Http2 header overloading, closing connection.') && connection_error( ENHANCE_YOUR_CALM ) ) if frame[:stream][:headers_size] > 262_144
297
297
 
298
298
  return unless frame[:flags][2] == 1 # fin
299
299
 
@@ -87,6 +87,10 @@ module Iodine
87
87
  end
88
88
  end
89
89
 
90
+ def on_shutdown
91
+ @renew = 0
92
+ end
93
+
90
94
  # Sends data through the socket. a shortcut for ws_client.response <<
91
95
  #
92
96
  # @return [true, false] Returns the true if the data was actually sent or nil if no data was sent.
@@ -39,6 +39,7 @@ module Iodine
39
39
 
40
40
  # a politer disconnection during shutdown.
41
41
  def on_shutdown
42
+ @handler.on_shutdown if @handler.respond_to?(:on_shutdown)
42
43
  go_away
43
44
  end
44
45
 
@@ -109,11 +109,9 @@ module Iodine
109
109
  Process.kill("INT", 0)
110
110
  next
111
111
  end
112
- shut_down_proc = Proc.new {|protocol| protocol.on_shutdown ; protocol.close }
113
112
  on_shutdown do
114
113
  log "Stopping to listen on port #{@port} and shutting down.\n"
115
114
  @server.close unless @server.closed?
116
- @ios.values.each {|p| run p, &shut_down_proc }
117
115
  end
118
116
  ::Iodine::Base::Listener.accept(@server, false)
119
117
  log "Iodine #{VERSION} is listening on port #{@port}#{ ' to SSL/TLS connections.' if @ssl}\n"
@@ -135,6 +133,11 @@ module Iodine
135
133
  log "Iodine #{VERSION} is running.\n"
136
134
  log "Press ^C to stop the cycling.\n"
137
135
  end
136
+ on_shutdown do
137
+ shut_down_proc = Proc.new {|prot| prot.on_shutdown ; prot.close }
138
+ @ios.values.each {|p| run p, &shut_down_proc }
139
+ @queue << REACTOR
140
+ end
138
141
  @queue << REACTOR
139
142
  end
140
143
  end
@@ -1,3 +1,3 @@
1
1
  module Iodine
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iodine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boaz Segev