websocket-driver 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 826108e30bdbc4629bcd1ef1c6b8029f9e4fed1b
4
- data.tar.gz: e117f305de4f1e50f7046e32605538cbbec763c7
3
+ metadata.gz: 9d47eccadd38dcb177ff49770edfe5a8bda26b87
4
+ data.tar.gz: d4efbfa12364856066684508a2b90abce548b072
5
5
  SHA512:
6
- metadata.gz: b0d72d49469e28e6245e3df38a4769b834fb83bc5b5185ee51a32b15178dcd4b247810a0c507b190eb6e0e6411e20a9a3ccd48c0b29ead666c83b3307160bfb4
7
- data.tar.gz: 15dd9190ce6ba1d40961820951c4056f60602ddac2d7d5d1c97923584a416b49a0b62d968eed95cf5eb8de7715170f999d18afb93c0fa92fd749e0c210ee16f0
6
+ metadata.gz: 220496d4df457463df4d0ccc30d15b8d36ffd9538dfabd01cae84f34155301eae00024afb61cd5ec54cce4f184b599661b449e5a511df8c64f28682234f6f49f
7
+ data.tar.gz: 5bb3d0fa0fd67ce5fa0c737def048fa880b96a220205ee140c22e3d6d9256612a55d18b1fad4de56973cef5196d2c50df30b5d238967d80db33dcd177abc1fd8
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ### 0.3.3 / 2014-04-24
2
+
3
+ * Fix problems with loading C and Java native extension code
4
+ * Correct the acceptable characters used in the HTTP parser
5
+ * Correct the draft-76 status line reason phrase
6
+
1
7
  ### 0.3.2 / 2013-12-29
2
8
 
3
9
  * Expand `max_length` to cover sequences of continuation frames and `draft-{75,76}`
data/README.md CHANGED
@@ -308,7 +308,7 @@ after `emit('open')` has fired.
308
308
 
309
309
  (The MIT License)
310
310
 
311
- Copyright (c) 2010-2013 James Coglan
311
+ Copyright (c) 2010-2014 James Coglan
312
312
 
313
313
  Permission is hereby granted, free of charge, to any person obtaining a copy of
314
314
  this software and associated documentation files (the 'Software'), to deal in
File without changes
@@ -17,7 +17,7 @@ module WebSocket
17
17
  class Driver
18
18
 
19
19
  root = File.expand_path('../driver', __FILE__)
20
- require root + '/../../websocket_mask'
20
+ require 'websocket_mask'
21
21
 
22
22
  if RUBY_PLATFORM =~ /java/
23
23
  require 'jruby'
@@ -32,7 +32,7 @@ module WebSocket
32
32
  private
33
33
 
34
34
  def handshake_response
35
- upgrade = "HTTP/1.1 101 Web Socket Protocol Handshake\r\n"
35
+ upgrade = "HTTP/1.1 101 WebSocket Protocol Handshake\r\n"
36
36
  upgrade << "Upgrade: WebSocket\r\n"
37
37
  upgrade << "Connection: Upgrade\r\n"
38
38
  upgrade << "Sec-WebSocket-Origin: #{@socket.env['HTTP_ORIGIN']}\r\n"
@@ -86,7 +86,7 @@ module WebSocket
86
86
 
87
87
  def big_endian(number)
88
88
  string = ''
89
- [24,16,8,0].each do |offset|
89
+ [24, 16, 8, 0].each do |offset|
90
90
  string << (number >> offset & 0xFF).chr
91
91
  end
92
92
  string
@@ -6,7 +6,7 @@ module WebSocket
6
6
  CR = 0x0D
7
7
  LF = 0x0A
8
8
 
9
- HEADER_LINE = /^([!#\$%&'\*\+\-\.\^_`\|~0-9a-z]+):\s*((?:\t|[\x20-\x7e])*?)\s*$/i
9
+ HEADER_LINE = /^([!#\$%&'\*\+\-\.\\\^_`\|~0-9a-z]+):\s*([\x20-\x7e]*?)\s*$/i
10
10
 
11
11
  attr_reader :headers
12
12
 
@@ -4,7 +4,7 @@ module WebSocket
4
4
  class Request
5
5
  include Headers
6
6
 
7
- REQUEST_LINE = /^([A-Z]+) +([\x21-\x7e]+) +(HTTP\/[0-9]\.[0-9])$/
7
+ REQUEST_LINE = /^(OPTIONS|GET|HEAD|POST|PUT|DELETE|TRACE|CONNECT) ([\x21-\x7e]+) (HTTP\/[0-9]+\.[0-9]+)$/
8
8
  REQUEST_TARGET = /^(.*?)(\?(.*))?$/
9
9
  RESERVED_HEADERS = %w[content-length content-type]
10
10
 
@@ -4,7 +4,7 @@ module WebSocket
4
4
  class Response
5
5
  include Headers
6
6
 
7
- STATUS_LINE = /^(HTTP\/[0-9]\.[0-9]) +([0-9]{3}) +(.*)$/
7
+ STATUS_LINE = /^(HTTP\/[0-9]+\.[0-9]+) ([0-9]{3}) ([\x20-\x7e]+)$/
8
8
 
9
9
  attr_reader :code
10
10
 
@@ -0,0 +1,2 @@
1
+ # Load C native extension
2
+ require "websocket-driver/websocket_mask"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: websocket-driver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Coglan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-29 00:00:00.000000000 Z
11
+ date: 2014-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine
@@ -56,16 +56,16 @@ description:
56
56
  email: jcoglan@gmail.com
57
57
  executables: []
58
58
  extensions:
59
- - ext/websocket_mask/extconf.rb
59
+ - ext/websocket-driver/extconf.rb
60
60
  extra_rdoc_files:
61
61
  - README.md
62
62
  files:
63
63
  - CHANGELOG.md
64
64
  - README.md
65
65
  - examples/tcp_server.rb
66
- - ext/websocket_mask/WebsocketMaskService.java
67
- - ext/websocket_mask/extconf.rb
68
- - ext/websocket_mask/websocket_mask.c
66
+ - ext/websocket-driver/WebsocketMaskService.java
67
+ - ext/websocket-driver/extconf.rb
68
+ - ext/websocket-driver/websocket_mask.c
69
69
  - lib/websocket/driver.rb
70
70
  - lib/websocket/driver/client.rb
71
71
  - lib/websocket/driver/draft75.rb
@@ -80,6 +80,7 @@ files:
80
80
  - lib/websocket/http/headers.rb
81
81
  - lib/websocket/http/request.rb
82
82
  - lib/websocket/http/response.rb
83
+ - lib/websocket/websocket_mask.rb
83
84
  homepage: http://github.com/faye/websocket-driver-ruby
84
85
  licenses:
85
86
  - MIT