ftw 0.0.31 → 0.0.32

Sign up to get free protection for your applications and to get access to all the features.
data/lib/ftw/version.rb CHANGED
@@ -3,5 +3,5 @@ require "ftw/namespace"
3
3
  # :nodoc:
4
4
  module FTW
5
5
  # The version of this library
6
- VERSION = "0.0.31"
6
+ VERSION = "0.0.32"
7
7
  end
@@ -4,6 +4,7 @@ require "ftw/protocol"
4
4
  require "ftw/crlf"
5
5
  require "socket"
6
6
  require "cabin"
7
+ require "http_parser"
7
8
 
8
9
  # FTW cannot fully respect the Rack 1.1 specification due to technical
9
10
  # limitations in the Rack design, specifically:
@@ -204,9 +205,7 @@ class Rack::Handler::FTW
204
205
 
205
206
  begin
206
207
  connection.write(response.to_s + CRLF)
207
- body.each do |chunk|
208
- connection.write(chunk)
209
- end
208
+ write_http_body(body, connection, response["Transfer-Encoding"] == "chunked")
210
209
  rescue => e
211
210
  @logger.error(e)
212
211
  connection.disconnect(e.inspect)
metadata CHANGED
@@ -1,175 +1,165 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ftw
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.31
5
- prerelease:
4
+ version: 0.0.32
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jordan Sissel
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
  date: 2013-05-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cabin
16
- version_requirements: !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
17
18
  requirements:
18
- - - !binary |-
19
- Pg==
19
+ - - ! '>'
20
20
  - !ruby/object:Gem::Version
21
- version: !binary |-
22
- MA==
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
23
25
  none: false
24
- requirement: !ruby/object:Gem::Requirement
25
26
  requirements:
26
- - - !binary |-
27
- Pg==
27
+ - - ! '>'
28
28
  - !ruby/object:Gem::Version
29
- version: !binary |-
30
- MA==
31
- none: false
32
- prerelease: false
33
- type: :runtime
29
+ version: '0'
34
30
  - !ruby/object:Gem::Dependency
35
31
  name: http_parser.rb
36
- version_requirements: !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
37
34
  requirements:
38
35
  - - '='
39
36
  - !ruby/object:Gem::Version
40
37
  version: 0.5.3
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
41
  none: false
42
- requirement: !ruby/object:Gem::Requirement
43
42
  requirements:
44
43
  - - '='
45
44
  - !ruby/object:Gem::Version
46
45
  version: 0.5.3
47
- none: false
48
- prerelease: false
49
- type: :runtime
50
46
  - !ruby/object:Gem::Dependency
51
47
  name: addressable
52
- version_requirements: !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
53
50
  requirements:
54
- - - ">="
51
+ - - ! '>='
55
52
  - !ruby/object:Gem::Version
56
- version: !binary |-
57
- MA==
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
58
57
  none: false
59
- requirement: !ruby/object:Gem::Requirement
60
58
  requirements:
61
- - - ">="
59
+ - - ! '>='
62
60
  - !ruby/object:Gem::Version
63
- version: !binary |-
64
- MA==
65
- none: false
66
- prerelease: false
67
- type: :runtime
61
+ version: '0'
68
62
  - !ruby/object:Gem::Dependency
69
63
  name: backports
70
- version_requirements: !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
71
66
  requirements:
72
67
  - - '='
73
68
  - !ruby/object:Gem::Version
74
69
  version: 2.3.0
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
75
73
  none: false
76
- requirement: !ruby/object:Gem::Requirement
77
74
  requirements:
78
75
  - - '='
79
76
  - !ruby/object:Gem::Version
80
77
  version: 2.3.0
81
- none: false
82
- prerelease: false
83
- type: :runtime
84
78
  - !ruby/object:Gem::Dependency
85
79
  name: minitest
86
- version_requirements: !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
87
82
  requirements:
88
- - - !binary |-
89
- Pg==
83
+ - - ! '>'
90
84
  - !ruby/object:Gem::Version
91
- version: !binary |-
92
- MA==
85
+ version: '0'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
93
89
  none: false
94
- requirement: !ruby/object:Gem::Requirement
95
90
  requirements:
96
- - - !binary |-
97
- Pg==
91
+ - - ! '>'
98
92
  - !ruby/object:Gem::Version
99
- version: !binary |-
100
- MA==
101
- none: false
102
- prerelease: false
103
- type: :development
104
- description: For The Web. Trying to build a solid and sane API for client and server web stuff. Client and Server operations for HTTP, WebSockets, SPDY, etc.
93
+ version: '0'
94
+ description: For The Web. Trying to build a solid and sane API for client and server
95
+ web stuff. Client and Server operations for HTTP, WebSockets, SPDY, etc.
105
96
  email:
106
97
  - jls@semicomplete.com
107
98
  executables: []
108
99
  extensions: []
109
100
  extra_rdoc_files: []
110
101
  files:
111
- - lib/ftw.rb
112
102
  - lib/rack/handler/ftw.rb
103
+ - lib/ftw.rb
113
104
  - lib/ftw/websocket.rb
114
105
  - lib/ftw/protocol.rb
115
106
  - lib/ftw/webserver.rb
116
107
  - lib/ftw/version.rb
117
108
  - lib/ftw/response.rb
109
+ - lib/ftw/websocket/constants.rb
110
+ - lib/ftw/websocket/writer.rb
111
+ - lib/ftw/websocket/parser.rb
112
+ - lib/ftw/websocket/rack.rb
118
113
  - lib/ftw/pool.rb
119
114
  - lib/ftw/cookies.rb
120
115
  - lib/ftw/agent.rb
121
116
  - lib/ftw/namespace.rb
122
117
  - lib/ftw/dns.rb
118
+ - lib/ftw/agent/configuration.rb
123
119
  - lib/ftw/cacert.pem
120
+ - lib/ftw/dns/hash.rb
121
+ - lib/ftw/dns/dns.rb
124
122
  - lib/ftw/crlf.rb
123
+ - lib/ftw/http/headers.rb
124
+ - lib/ftw/http/message.rb
125
125
  - lib/ftw/poolable.rb
126
126
  - lib/ftw/request.rb
127
127
  - lib/ftw/connection.rb
128
128
  - lib/ftw/server.rb
129
129
  - lib/ftw/singleton.rb
130
- - lib/ftw/websocket/constants.rb
131
- - lib/ftw/websocket/writer.rb
132
- - lib/ftw/websocket/parser.rb
133
- - lib/ftw/websocket/rack.rb
134
- - lib/ftw/agent/configuration.rb
135
- - lib/ftw/dns/hash.rb
136
- - lib/ftw/dns/dns.rb
137
- - lib/ftw/http/headers.rb
138
- - lib/ftw/http/message.rb
139
130
  - test/docs.rb
140
131
  - test/all.rb
141
- - test/testing.rb
142
132
  - test/ftw/crlf.rb
143
- - test/ftw/singleton.rb
144
133
  - test/ftw/http/headers.rb
145
134
  - test/ftw/http/dns.rb
135
+ - test/ftw/singleton.rb
136
+ - test/testing.rb
146
137
  - README.md
147
138
  homepage: http://github.com/jordansissel/ruby-ftw
148
139
  licenses:
149
140
  - Apache License (2.0)
150
- post_install_message:
141
+ post_install_message:
151
142
  rdoc_options: []
152
143
  require_paths:
153
144
  - lib
154
145
  - lib
155
146
  required_ruby_version: !ruby/object:Gem::Requirement
147
+ none: false
156
148
  requirements:
157
- - - ">="
149
+ - - ! '>='
158
150
  - !ruby/object:Gem::Version
159
- version: !binary |-
160
- MA==
161
- none: false
151
+ version: '0'
162
152
  required_rubygems_version: !ruby/object:Gem::Requirement
153
+ none: false
163
154
  requirements:
164
- - - ">="
155
+ - - ! '>='
165
156
  - !ruby/object:Gem::Version
166
- version: !binary |-
167
- MA==
168
- none: false
157
+ version: '0'
169
158
  requirements: []
170
- rubyforge_project:
171
- rubygems_version: 1.8.24
172
- signing_key:
159
+ rubyforge_project:
160
+ rubygems_version: 1.8.25
161
+ signing_key:
173
162
  specification_version: 3
174
- summary: For The Web. Trying to build a solid and sane API for client and server web stuff. Client and Server operations for HTTP, WebSockets, SPDY, etc.
163
+ summary: For The Web. Trying to build a solid and sane API for client and server web
164
+ stuff. Client and Server operations for HTTP, WebSockets, SPDY, etc.
175
165
  test_files: []