thin 1.2.4-x86-mswin32 → 1.2.6-x86-mswin32
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +10 -0
- data/Rakefile +7 -4
- data/example/thin.god +1 -1
- data/ext/thin_parser/common.rl +1 -1
- data/ext/thin_parser/parser.c +1026 -293
- data/ext/thin_parser/thin.c +3 -0
- data/lib/rack/adapter/loader.rb +12 -0
- data/lib/rack/adapter/rails.rb +2 -3
- data/lib/thin.rb +24 -24
- data/lib/thin/controllers/cluster.rb +57 -6
- data/lib/thin/controllers/controller.rb +1 -2
- data/lib/thin/daemonizing.rb +5 -3
- data/lib/thin/request.rb +7 -3
- data/lib/thin/runner.rb +5 -2
- data/lib/thin/server.rb +2 -1
- data/lib/thin/version.rb +2 -2
- data/lib/thin_parser.so +0 -0
- data/spec/controllers/cluster_spec.rb +32 -0
- data/spec/rack/loader_spec.rb +13 -0
- data/spec/request/parser_spec.rb +29 -1
- data/spec/request/processing_spec.rb +5 -0
- data/spec/server_spec.rb +4 -0
- data/spec/spec_helper.rb +1 -1
- data/tasks/gem.rake +5 -13
- data/tasks/spec.rake +39 -45
- metadata +6 -33
@@ -42,4 +42,9 @@ describe Request, 'processing' do
|
|
42
42
|
big_headers = "X-Test: X\r\n" * (1024 * (80 + 32))
|
43
43
|
proc { R("GET / HTTP/1.1\r\n#{big_headers}\r\n") }.should raise_error(InvalidRequest)
|
44
44
|
end
|
45
|
+
|
46
|
+
it "should set body external encoding to ASCII_8BIT" do
|
47
|
+
pending("Ruby 1.9 compatible implementations only") unless StringIO.instance_methods.include? :external_encoding
|
48
|
+
Request.new.body.external_encoding.should == Encoding::ASCII_8BIT
|
49
|
+
end
|
45
50
|
end
|
data/spec/server_spec.rb
CHANGED
@@ -12,6 +12,10 @@ describe Server do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
it "should set lower maximum_connections size when too large" do
|
15
|
+
# root users under Linux will not have a limitation on maximum
|
16
|
+
# connections, so we cannot really run this test under that
|
17
|
+
# condition.
|
18
|
+
pending("only for non-root users") if Process.euid == 0
|
15
19
|
@server.maximum_connections = 100_000
|
16
20
|
@server.config
|
17
21
|
@server.maximum_connections.should < 100_000
|
data/spec/spec_helper.rb
CHANGED
@@ -4,7 +4,6 @@ require 'spec'
|
|
4
4
|
require 'benchmark'
|
5
5
|
require 'timeout'
|
6
6
|
require 'fileutils'
|
7
|
-
require 'benchmark_unit'
|
8
7
|
require 'net/http'
|
9
8
|
require 'socket'
|
10
9
|
|
@@ -23,6 +22,7 @@ end
|
|
23
22
|
module Matchers
|
24
23
|
class BeFasterThen
|
25
24
|
def initialize(max_time)
|
25
|
+
require 'benchmark_unit'
|
26
26
|
@max_time = max_time
|
27
27
|
end
|
28
28
|
|
data/tasks/gem.rake
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
require 'rake/gempackagetask'
|
2
2
|
require 'yaml'
|
3
3
|
|
4
|
-
WIN_SUFFIX = ENV['WIN_SUFFIX'] || 'x86-mswin32'
|
5
|
-
|
6
4
|
task :clean => :clobber_package
|
7
5
|
|
8
6
|
Thin::GemSpec = Gem::Specification.new do |s|
|
@@ -59,16 +57,10 @@ end
|
|
59
57
|
task :gem => :tag_warn
|
60
58
|
|
61
59
|
namespace :gem do
|
62
|
-
desc
|
63
|
-
task :
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
desc 'Upload gems (ruby & win32) to rubyforge.org'
|
68
|
-
task :upload => :gem do
|
69
|
-
sh 'rubyforge login'
|
70
|
-
sh "rubyforge add_release thin thin #{Thin::VERSION::STRING} pkg/#{Thin::GemSpec.full_name}.gem"
|
71
|
-
sh "rubyforge add_file thin thin #{Thin::VERSION::STRING} pkg/#{Thin::GemSpec.full_name}.gem"
|
72
|
-
sh "rubyforge add_file thin thin #{Thin::VERSION::STRING} pkg/#{Thin::GemSpec.full_name}-#{WIN_SUFFIX}.gem"
|
60
|
+
desc 'Upload gems to gemcutter.org'
|
61
|
+
task :push => :gem do
|
62
|
+
Dir["pkg/#{Thin::GemSpec.full_name}*.gem"].each do |file|
|
63
|
+
puts "gem push #{file}"
|
64
|
+
end
|
73
65
|
end
|
74
66
|
end
|
data/tasks/spec.rake
CHANGED
@@ -1,49 +1,43 @@
|
|
1
1
|
CLEAN.include %w(coverage tmp log)
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
def spec_task(name, specs)
|
25
|
-
Spec::Rake::SpecTask.new(name) do |t|
|
26
|
-
t.libs << 'lib'
|
27
|
-
t.spec_opts = %w(-fs -c)
|
28
|
-
t.spec_files = specs
|
29
|
-
end
|
3
|
+
require 'spec/rake/spectask'
|
4
|
+
|
5
|
+
PERF_SPECS = FileList['spec/perf/*_spec.rb']
|
6
|
+
WIN_SPECS = %w(
|
7
|
+
spec/backends/unix_server_spec.rb
|
8
|
+
spec/controllers/service_spec.rb
|
9
|
+
spec/daemonizing_spec.rb
|
10
|
+
spec/server/unix_socket_spec.rb
|
11
|
+
spec/server/swiftiply_spec.rb
|
12
|
+
)
|
13
|
+
# HACK Event machine causes some problems when running multiple
|
14
|
+
# tests in the same VM so we split the specs in 2 before I find
|
15
|
+
# a better solution...
|
16
|
+
SPECS2 = %w(spec/server/threaded_spec.rb spec/server/tcp_spec.rb)
|
17
|
+
SPECS = FileList['spec/**/*_spec.rb'] - PERF_SPECS - SPECS2
|
18
|
+
|
19
|
+
def spec_task(name, specs)
|
20
|
+
Spec::Rake::SpecTask.new(name) do |t|
|
21
|
+
t.libs << 'lib'
|
22
|
+
t.spec_opts = %w(-fs -c)
|
23
|
+
t.spec_files = specs
|
30
24
|
end
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
25
|
+
end
|
26
|
+
|
27
|
+
desc "Run all examples"
|
28
|
+
spec_task :spec, SPECS
|
29
|
+
spec_task :spec2, SPECS2
|
30
|
+
task :spec => [:compile, :spec2]
|
31
|
+
|
32
|
+
desc "Run all performance examples"
|
33
|
+
spec_task 'spec:perf', PERF_SPECS
|
34
|
+
|
35
|
+
task :check_benchmark_unit_gem do
|
36
|
+
begin
|
37
|
+
require 'benchmark_unit'
|
38
|
+
rescue LoadError
|
39
|
+
abort "To run specs, install benchmark_unit gem"
|
46
40
|
end
|
47
|
-
|
48
|
-
|
49
|
-
|
41
|
+
end
|
42
|
+
|
43
|
+
task 'spec:perf' => :check_benchmark_unit_gem
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.6
|
5
5
|
platform: x86-mswin32
|
6
6
|
authors:
|
7
7
|
- Marc-Andre Cournoyer
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2010-02-25 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -72,19 +72,14 @@ files:
|
|
72
72
|
- example/thin_solaris_smf.erb
|
73
73
|
- example/thin_solaris_smf.readme.txt
|
74
74
|
- example/vlad.rake
|
75
|
-
- lib/rack
|
76
|
-
- lib/rack/adapter
|
77
75
|
- lib/rack/adapter/loader.rb
|
78
76
|
- lib/rack/adapter/rails.rb
|
79
|
-
- lib/thin
|
80
|
-
- lib/thin/backends
|
81
77
|
- lib/thin/backends/base.rb
|
82
78
|
- lib/thin/backends/swiftiply_client.rb
|
83
79
|
- lib/thin/backends/tcp_server.rb
|
84
80
|
- lib/thin/backends/unix_server.rb
|
85
81
|
- lib/thin/command.rb
|
86
82
|
- lib/thin/connection.rb
|
87
|
-
- lib/thin/controllers
|
88
83
|
- lib/thin/controllers/cluster.rb
|
89
84
|
- lib/thin/controllers/controller.rb
|
90
85
|
- lib/thin/controllers/service.rb
|
@@ -101,53 +96,36 @@ files:
|
|
101
96
|
- lib/thin/statuses.rb
|
102
97
|
- lib/thin/version.rb
|
103
98
|
- lib/thin.rb
|
104
|
-
- spec/backends
|
105
99
|
- spec/backends/swiftiply_client_spec.rb
|
106
100
|
- spec/backends/tcp_server_spec.rb
|
107
101
|
- spec/backends/unix_server_spec.rb
|
108
102
|
- spec/command_spec.rb
|
109
|
-
- spec/configs
|
110
103
|
- spec/configs/cluster.yml
|
111
104
|
- spec/configs/single.yml
|
112
105
|
- spec/connection_spec.rb
|
113
|
-
- spec/controllers
|
114
106
|
- spec/controllers/cluster_spec.rb
|
115
107
|
- spec/controllers/controller_spec.rb
|
116
108
|
- spec/controllers/service_spec.rb
|
117
109
|
- spec/daemonizing_spec.rb
|
118
110
|
- spec/headers_spec.rb
|
119
111
|
- spec/logging_spec.rb
|
120
|
-
- spec/perf
|
121
112
|
- spec/perf/request_perf_spec.rb
|
122
113
|
- spec/perf/response_perf_spec.rb
|
123
114
|
- spec/perf/server_perf_spec.rb
|
124
|
-
- spec/rack
|
125
115
|
- spec/rack/loader_spec.rb
|
126
116
|
- spec/rack/rails_adapter_spec.rb
|
127
|
-
- spec/rails_app
|
128
|
-
- spec/rails_app/app
|
129
|
-
- spec/rails_app/app/controllers
|
130
117
|
- spec/rails_app/app/controllers/application.rb
|
131
118
|
- spec/rails_app/app/controllers/simple_controller.rb
|
132
|
-
- spec/rails_app/app/helpers
|
133
119
|
- spec/rails_app/app/helpers/application_helper.rb
|
134
|
-
- spec/rails_app/app/views
|
135
|
-
- spec/rails_app/app/views/simple
|
136
120
|
- spec/rails_app/app/views/simple/index.html.erb
|
137
|
-
- spec/rails_app/config
|
138
121
|
- spec/rails_app/config/boot.rb
|
139
122
|
- spec/rails_app/config/environment.rb
|
140
|
-
- spec/rails_app/config/environments
|
141
123
|
- spec/rails_app/config/environments/development.rb
|
142
124
|
- spec/rails_app/config/environments/production.rb
|
143
125
|
- spec/rails_app/config/environments/test.rb
|
144
|
-
- spec/rails_app/config/initializers
|
145
126
|
- spec/rails_app/config/initializers/inflections.rb
|
146
127
|
- spec/rails_app/config/initializers/mime_types.rb
|
147
128
|
- spec/rails_app/config/routes.rb
|
148
|
-
- spec/rails_app/log
|
149
|
-
- spec/rails_app/log/mongrel_debug
|
150
|
-
- spec/rails_app/public
|
151
129
|
- spec/rails_app/public/404.html
|
152
130
|
- spec/rails_app/public/422.html
|
153
131
|
- spec/rails_app/public/500.html
|
@@ -155,40 +133,33 @@ files:
|
|
155
133
|
- spec/rails_app/public/dispatch.fcgi
|
156
134
|
- spec/rails_app/public/dispatch.rb
|
157
135
|
- spec/rails_app/public/favicon.ico
|
158
|
-
- spec/rails_app/public/images
|
159
136
|
- spec/rails_app/public/images/rails.png
|
160
137
|
- spec/rails_app/public/index.html
|
161
|
-
- spec/rails_app/public/javascripts
|
162
138
|
- spec/rails_app/public/javascripts/application.js
|
163
139
|
- spec/rails_app/public/javascripts/controls.js
|
164
140
|
- spec/rails_app/public/javascripts/dragdrop.js
|
165
141
|
- spec/rails_app/public/javascripts/effects.js
|
166
142
|
- spec/rails_app/public/javascripts/prototype.js
|
167
143
|
- spec/rails_app/public/robots.txt
|
168
|
-
- spec/rails_app/script
|
169
144
|
- spec/rails_app/script/about
|
170
145
|
- spec/rails_app/script/console
|
171
146
|
- spec/rails_app/script/destroy
|
172
147
|
- spec/rails_app/script/generate
|
173
|
-
- spec/rails_app/script/performance
|
174
148
|
- spec/rails_app/script/performance/benchmarker
|
175
149
|
- spec/rails_app/script/performance/profiler
|
176
150
|
- spec/rails_app/script/performance/request
|
177
151
|
- spec/rails_app/script/plugin
|
178
|
-
- spec/rails_app/script/process
|
179
152
|
- spec/rails_app/script/process/inspector
|
180
153
|
- spec/rails_app/script/process/reaper
|
181
154
|
- spec/rails_app/script/process/spawner
|
182
155
|
- spec/rails_app/script/runner
|
183
156
|
- spec/rails_app/script/server
|
184
|
-
- spec/request
|
185
157
|
- spec/request/mongrel_spec.rb
|
186
158
|
- spec/request/parser_spec.rb
|
187
159
|
- spec/request/persistent_spec.rb
|
188
160
|
- spec/request/processing_spec.rb
|
189
161
|
- spec/response_spec.rb
|
190
162
|
- spec/runner_spec.rb
|
191
|
-
- spec/server
|
192
163
|
- spec/server/builder_spec.rb
|
193
164
|
- spec/server/pipelining_spec.rb
|
194
165
|
- spec/server/robustness_spec.rb
|
@@ -218,6 +189,8 @@ files:
|
|
218
189
|
- lib/thin_parser.so
|
219
190
|
has_rdoc: true
|
220
191
|
homepage: http://code.macournoyer.com/thin/
|
192
|
+
licenses: []
|
193
|
+
|
221
194
|
post_install_message:
|
222
195
|
rdoc_options: []
|
223
196
|
|
@@ -238,9 +211,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
238
211
|
requirements: []
|
239
212
|
|
240
213
|
rubyforge_project: thin
|
241
|
-
rubygems_version: 1.3.
|
214
|
+
rubygems_version: 1.3.5
|
242
215
|
signing_key:
|
243
|
-
specification_version:
|
216
|
+
specification_version: 3
|
244
217
|
summary: A thin and fast web server
|
245
218
|
test_files: []
|
246
219
|
|