swiftiply 0.6.1 → 0.6.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/src/swiftcore/Swiftiply.rb +3 -2
- data/src/swiftcore/evented_mongrel.rb +10 -3
- data/src/swiftcore/swiftiplied_mongrel.rb +7 -2
- data/swiftiply.gemspec +1 -1
- metadata +27 -27
data/src/swiftcore/Swiftiply.rb
CHANGED
@@ -18,7 +18,7 @@ end
|
|
18
18
|
|
19
19
|
module Swiftcore
|
20
20
|
module Swiftiply
|
21
|
-
Version = '0.6.1'
|
21
|
+
Version = '0.6.1.1'
|
22
22
|
|
23
23
|
# Yeah, these constants look kind of tacky. Inside of tight loops,
|
24
24
|
# though, using them makes a small but measurable difference, and those
|
@@ -407,7 +407,8 @@ module Swiftcore
|
|
407
407
|
@data.unshift data
|
408
408
|
push
|
409
409
|
else
|
410
|
-
|
410
|
+
# Note the \0 below. intern() blows up when passed a \0. People who are trying to break a server like to pass \0s. This should cope with that.
|
411
|
+
if data =~ /^Host:\s*([^\r\0:]*)/
|
411
412
|
# NOTE: Should I be using intern for this? It might not
|
412
413
|
# be a good idea.
|
413
414
|
@name = $1.intern
|
@@ -82,14 +82,19 @@ module Mongrel
|
|
82
82
|
end
|
83
83
|
|
84
84
|
class HttpServer
|
85
|
-
def initialize(host, port, num_processors=
|
85
|
+
def initialize(host, port, num_processors=950, x=0, y=nil) # Deal with Mongrel 1.0.1 or earlier, as well as later.
|
86
86
|
@socket = nil
|
87
87
|
@classifier = URIClassifier.new
|
88
88
|
@host = host
|
89
89
|
@port = port
|
90
90
|
@workers = ThreadGroup.new
|
91
|
-
|
92
|
-
|
91
|
+
if y
|
92
|
+
@throttle = x
|
93
|
+
@timeout = y || 60
|
94
|
+
else
|
95
|
+
@timeout = x
|
96
|
+
end
|
97
|
+
@num_processors = num_processors #num_processors is pointless for evented....
|
93
98
|
@death_time = 60
|
94
99
|
self.class.const_set(:Instance,self)
|
95
100
|
end
|
@@ -98,6 +103,8 @@ module Mongrel
|
|
98
103
|
trap('INT') { raise StopServer }
|
99
104
|
trap('TERM') { raise StopServer }
|
100
105
|
@acceptor = Thread.new do
|
106
|
+
EventMachine.epoll
|
107
|
+
EventMachine.set_descriptor_table_size(4096)
|
101
108
|
EventMachine.run do
|
102
109
|
begin
|
103
110
|
EventMachine.start_server(@host,@port,MongrelProtocol)
|
@@ -94,14 +94,19 @@ module Mongrel
|
|
94
94
|
# a key. If someone want to donate any patches. Otherwise, this won't
|
95
95
|
# really be useful to most people until 0.7.0.
|
96
96
|
|
97
|
-
def initialize(host, port, num_processors=
|
97
|
+
def initialize(host, port, num_processors=950, x=0, y=nil,key='') # Deal with Mongrel 1.0.1 or earlier, as well as later.
|
98
98
|
@socket = nil
|
99
99
|
@classifier = URIClassifier.new
|
100
100
|
@host = host
|
101
101
|
@port = port
|
102
102
|
@key = key
|
103
103
|
@workers = ThreadGroup.new
|
104
|
-
|
104
|
+
if y
|
105
|
+
@throttle = x
|
106
|
+
@timeout = y || 60
|
107
|
+
else
|
108
|
+
@timeout = x
|
109
|
+
end
|
105
110
|
@num_processors = num_processors
|
106
111
|
@death_time = 60
|
107
112
|
self.class.const_set(:Instance,self)
|
data/swiftiply.gemspec
CHANGED
@@ -11,7 +11,7 @@ spec = Gem::Specification.new do |s|
|
|
11
11
|
s.name = 'swiftiply'
|
12
12
|
s.author = %q(Kirk Haines)
|
13
13
|
s.email = %q(wyhaines@gmail.com)
|
14
|
-
s.version = '0.6.1'
|
14
|
+
s.version = '0.6.1.1'
|
15
15
|
s.summary = %q(A fast clustering proxy for web applications.)
|
16
16
|
s.platform = Gem::Platform::RUBY
|
17
17
|
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: swiftiply
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.6.1
|
7
|
-
date: 2007-
|
6
|
+
version: 0.6.1.1
|
7
|
+
date: 2007-11-06 00:00:00 -06:00
|
8
8
|
summary: A fast clustering proxy for web applications.
|
9
9
|
require_paths:
|
10
10
|
- src
|
@@ -29,52 +29,52 @@ post_install_message:
|
|
29
29
|
authors:
|
30
30
|
- Kirk Haines
|
31
31
|
files:
|
32
|
-
- bin
|
33
32
|
- external
|
34
|
-
-
|
33
|
+
- bin
|
35
34
|
- test
|
36
|
-
-
|
37
|
-
- README
|
38
|
-
- setup.rb
|
35
|
+
- src
|
39
36
|
- ext
|
40
37
|
- swiftiply.gemspec
|
41
|
-
-
|
38
|
+
- README
|
39
|
+
- CONTRIBUTORS
|
40
|
+
- setup.rb
|
41
|
+
- external/package.rb
|
42
|
+
- external/test_support.rb
|
42
43
|
- bin/mongrel_rails
|
44
|
+
- bin/swiftiply
|
43
45
|
- bin/swiftiply_mongrel_rails
|
44
46
|
- bin/echo_client
|
45
|
-
- external/test_support.rb
|
46
|
-
- external/package.rb
|
47
|
-
- src/swiftcore
|
48
|
-
- src/fastfilereader.rb
|
49
|
-
- src/swiftcore/types.rb
|
50
|
-
- src/swiftcore/Swiftiply.rb
|
51
|
-
- src/swiftcore/swiftiplied_mongrel.rb
|
52
|
-
- src/swiftcore/evented_mongrel.rb
|
53
|
-
- src/swiftcore/Swiftiply
|
54
|
-
- src/swiftcore/Swiftiply/swiftiply_client.rb
|
55
|
-
- src/swiftcore/Swiftiply/support_pagecache.rb
|
56
|
-
- test/TC_Swiftiply.rb
|
57
|
-
- test/TC_ProxyBag.rb
|
58
47
|
- test/TC_ProxyBag
|
59
48
|
- test/TC_Swiftiply
|
49
|
+
- test/TC_Swiftiply.rb
|
50
|
+
- test/TC_ProxyBag.rb
|
60
51
|
- test/TC_ProxyBag/test_serve_static_file
|
61
|
-
- test/TC_Swiftiply/
|
52
|
+
- test/TC_Swiftiply/test_serve_normal_proxy_with_authentication
|
62
53
|
- test/TC_Swiftiply/slow_echo_client
|
54
|
+
- test/TC_Swiftiply/mongrel
|
55
|
+
- test/TC_Swiftiply/test_serve_static_file_from_cachedir
|
63
56
|
- test/TC_Swiftiply/test_serve_static_file
|
64
57
|
- test/TC_Swiftiply/test_serve_normal_proxy
|
65
|
-
- test/TC_Swiftiply/
|
66
|
-
- test/TC_Swiftiply/test_serve_normal_proxy_with_authentication
|
58
|
+
- test/TC_Swiftiply/mongrel/threaded_hello.rb
|
67
59
|
- test/TC_Swiftiply/mongrel/swiftiplied_hello.rb
|
68
60
|
- test/TC_Swiftiply/mongrel/evented_hello.rb
|
69
|
-
- test/TC_Swiftiply/mongrel/threaded_hello.rb
|
70
61
|
- test/TC_Swiftiply/test_serve_static_file_from_cachedir/public
|
62
|
+
- src/fastfilereader.rb
|
63
|
+
- src/swiftcore
|
64
|
+
- src/swiftcore/types.rb
|
65
|
+
- src/swiftcore/Swiftiply
|
66
|
+
- src/swiftcore/evented_mongrel.rb
|
67
|
+
- src/swiftcore/Swiftiply.rb
|
68
|
+
- src/swiftcore/swiftiplied_mongrel.rb
|
69
|
+
- src/swiftcore/Swiftiply/swiftiply_client.rb
|
70
|
+
- src/swiftcore/Swiftiply/support_pagecache.rb
|
71
71
|
- ext/swiftiply_parse
|
72
72
|
- ext/fastfilereader
|
73
73
|
- ext/swiftiply_parse/parse.rl
|
74
|
-
- ext/fastfilereader/extconf.rb
|
75
74
|
- ext/fastfilereader/rubymain.cpp
|
76
|
-
- ext/fastfilereader/
|
75
|
+
- ext/fastfilereader/extconf.rb
|
77
76
|
- ext/fastfilereader/mapper.h
|
77
|
+
- ext/fastfilereader/mapper.cpp
|
78
78
|
test_files: []
|
79
79
|
|
80
80
|
rdoc_options:
|