faye-websocket 0.10.4 → 0.10.5

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

Potentially problematic release.


This version of faye-websocket might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6fbd1159ad8b64ba0bc400f3a055c1e232605af0
4
- data.tar.gz: b509699da5766504c7ae9d09df4f45689ca92073
3
+ metadata.gz: 5dfb25398e331800baf73b73988b88639753fac9
4
+ data.tar.gz: 86e8c6d23a38fa6e699be24dd0aa677a7ad29c0b
5
5
  SHA512:
6
- metadata.gz: e185f203d2283ced2859f58242549b506541afc5f67a97c694f7c0682cb6cd206afcad8ba62ddb5498fb333361ce57f216a3cfbe8c100cc94b7e312af176f36b
7
- data.tar.gz: 536799ce4dbefa30ecdde546b33b715df3166f69d8fc48dc1ff33b8cbe7bb7703e05fafe6b31a08a707c2c1155c7fef0abdb3c74ea166e77fa9fd78949c9b318
6
+ metadata.gz: 8900d2b969e66c6a9a338cf763c00f9c59728884ce52c7fe1034d852487c323b14bcab97b4a411761f6bd6d6af7f600f5a2de67c9275be912acbfe50598a0512
7
+ data.tar.gz: 6f8df7095506203c476b487383653ef28641bfba255b5febec138aa17af53f9b4e234f951e0f554107bbc461292ef4998cd91c94a0045dc470dc7236f6cfd5aa
@@ -1,3 +1,7 @@
1
+ ### 0.10.5 / 2016-11-12
2
+
3
+ * Set the SNI hostname when making secure requests
4
+
1
5
  ### 0.10.4 / 2016-05-20
2
6
 
3
7
  * Amend warnings issued when running with -W2
data/README.md CHANGED
@@ -10,13 +10,14 @@ This is a general-purpose WebSocket implementation extracted from the
10
10
  WebSocket servers and clients in Ruby. It does not provide a server itself, but
11
11
  rather makes it easy to handle WebSocket connections within an existing
12
12
  [Rack](http://rack.github.io/) application. It does not provide any abstraction
13
- other than the standard [WebSocket API](http://dev.w3.org/html5/websockets/).
13
+ other than the standard [WebSocket
14
+ API](https://html.spec.whatwg.org/multipage/comms.html#network).
14
15
 
15
16
  It also provides an abstraction for handling
16
- [EventSource](http://dev.w3.org/html5/eventsource/) connections, which are
17
- one-way connections that allow the server to push data to the client. They are
18
- based on streaming HTTP responses and can be easier to access via proxies than
19
- WebSockets.
17
+ [EventSource](https://html.spec.whatwg.org/multipage/comms.html#server-sent-events)
18
+ connections, which are one-way connections that allow the server to push data to
19
+ the client. They are based on streaming HTTP responses and can be easier to
20
+ access via proxies than WebSockets.
20
21
 
21
22
  The following web servers are supported. Other servers that implement the
22
23
  `rack.hijack` API should also work.
@@ -198,7 +199,9 @@ is an optional hash containing any of these keys:
198
199
  The default value is `2^26 - 1`, or 1 byte short of 64 MiB.
199
200
  * `:ping` - an integer that sets how often the WebSocket should send ping
200
201
  frames, measured in seconds
201
-
202
+ * `:tls` - a hash containing key-value pairs for specifying TLS parameters.
203
+ These are passed along to EventMachine and you can find
204
+ [more details here](http://rubydoc.info/gems/eventmachine/EventMachine%2FConnection%3Astart_tls)
202
205
 
203
206
  ## WebSocket API
204
207
 
@@ -1,8 +1,8 @@
1
1
  # API references:
2
2
  #
3
- # * http://dev.w3.org/html5/websockets/
4
- # * http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-eventtarget
5
- # * http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-event
3
+ # * https://html.spec.whatwg.org/multipage/comms.html#network
4
+ # * https://dom.spec.whatwg.org/#interface-eventtarget
5
+ # * https://dom.spec.whatwg.org/#interface-event
6
6
 
7
7
  require 'forwardable'
8
8
  require 'stringio'
@@ -34,7 +34,11 @@ module Faye
34
34
  secure = SECURE_PROTOCOLS.include?(uri.scheme)
35
35
  @proxy = nil
36
36
 
37
- @stream.start_tls(@origin_tls) if secure
37
+ if secure
38
+ origin_tls = {:sni_hostname => uri.host}.merge(@origin_tls)
39
+ @stream.start_tls(origin_tls)
40
+ end
41
+
38
42
  @driver.start
39
43
  end
40
44
 
@@ -55,7 +59,12 @@ module Faye
55
59
 
56
60
  def on_connect(stream)
57
61
  @stream = stream
58
- @stream.start_tls(@socket_tls) if @secure
62
+
63
+ if @secure
64
+ socket_tls = {:sni_hostname => URI.parse(@url).host}.merge(@socket_tls)
65
+ @stream.start_tls(socket_tls)
66
+ end
67
+
59
68
  worker = @proxy || @driver
60
69
  worker.start
61
70
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faye-websocket
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.4
4
+ version: 0.10.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Coglan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-20 00:00:00.000000000 Z
11
+ date: 2016-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: public_suffix
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "<"
74
+ - !ruby/object:Gem::Version
75
+ version: 1.5.0
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "<"
81
+ - !ruby/object:Gem::Version
82
+ version: 1.5.0
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: puma
71
85
  requirement: !ruby/object:Gem::Requirement