mongrel 0.3.12 → 0.3.12.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/bin/mongrel_rails +12 -6
- data/doc/rdoc/classes/Class.src/M000001.html +10 -10
- data/doc/rdoc/classes/Class.src/M000002.html +46 -46
- data/doc/rdoc/classes/Class.src/M000003.html +7 -7
- data/doc/rdoc/classes/Class.src/M000004.html +6 -6
- data/doc/rdoc/classes/IO.src/M000005.html +5 -5
- data/doc/rdoc/classes/IO.src/M000006.html +5 -5
- data/doc/rdoc/classes/Kernel.src/M000025.html +5 -5
- data/doc/rdoc/classes/Kernel.src/M000026.html +11 -11
- data/doc/rdoc/classes/Mongrel.html +1 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000030.html +1 -1
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000099.html +10 -10
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000100.html +9 -9
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000101.html +4 -4
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000102.html +18 -18
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000103.html +5 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000104.html +16 -16
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000105.html +19 -19
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000106.html +4 -4
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000107.html +10 -11
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000108.html +5 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000109.html +8 -8
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000110.html +7 -7
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000111.html +4 -4
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000112.html +14 -13
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000113.html +5 -33
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000114.html +33 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000115.html +18 -0
- data/doc/rdoc/classes/Mongrel/Const.html +11 -1
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/M000116.html +5 -5
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/M000117.html +18 -0
- data/doc/rdoc/classes/Mongrel/HeaderOut.html +0 -185
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000072.html +4 -4
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000073.html +4 -4
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000054.html +3 -1
- data/doc/rdoc/classes/Mongrel/{StopServer.html → HttpParserError.html} +5 -11
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000118.html +15 -7
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000119.html +7 -7
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000120.html +7 -19
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000121.html +32 -0
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000075.html +12 -12
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000076.html +6 -6
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000077.html +11 -11
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000078.html +8 -8
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000079.html +8 -8
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000080.html +9 -9
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000081.html +4 -4
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000082.html +6 -6
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000083.html +4 -4
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000064.html +10 -10
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000065.html +51 -50
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000066.html +10 -10
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000067.html +45 -45
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000068.html +14 -14
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000069.html +4 -4
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000070.html +8 -8
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000071.html +4 -4
- data/doc/rdoc/classes/ObjectTracker.src/M000019.html +20 -22
- data/doc/rdoc/classes/RequestLog/Access.src/M000122.html +19 -0
- data/doc/rdoc/classes/RequestLog/Files.src/{M000121.html → M000123.html} +5 -5
- data/doc/rdoc/classes/RequestLog/Objects.src/{M000122.html → M000124.html} +5 -5
- data/doc/rdoc/classes/RequestLog/Params.src/{M000123.html → M000125.html} +5 -5
- data/doc/rdoc/classes/Stats.html +1 -1
- data/doc/rdoc/classes/Stats.src/M000012.html +2 -2
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/ext/http11/http11_c.html +1 -1
- data/doc/rdoc/files/lib/mongrel/command_rb.html +1 -1
- data/doc/rdoc/files/lib/mongrel/debug_rb.html +1 -1
- data/doc/rdoc/files/lib/mongrel/handlers_rb.html +1 -1
- data/doc/rdoc/files/lib/mongrel/stats_rb.html +1 -1
- data/doc/rdoc/files/lib/mongrel_rb.html +1 -1
- data/examples/random_thrash.rb +19 -0
- data/ext/http11/http11.c +57 -12
- data/ext/http11/http11_parser.c +58 -52
- data/lib/mongrel.rb +37 -10
- data/lib/mongrel/command.rb +1 -1
- data/lib/mongrel/debug.rb +39 -125
- data/lib/mongrel/handlers.rb +2 -2
- data/lib/mongrel/rails.rb +2 -1
- data/lib/mongrel/stats.rb +2 -2
- data/test/test_configurator.rb +2 -2
- data/test/test_debug.rb +2 -4
- data/test/test_http11.rb +76 -7
- data/test/test_stats.rb +6 -4
- data/test/test_uriclassifier.rb +0 -14
- metadata +12 -24
- data/doc/rdoc/classes/Mongrel/CGIWrapper.html +0 -383
- data/doc/rdoc/classes/Mongrel/Configurator.html +0 -563
- data/doc/rdoc/classes/Mongrel/Error404Handler.html +0 -171
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/M000115.html +0 -18
- data/doc/rdoc/classes/Mongrel/HttpHandler.html +0 -152
- data/doc/rdoc/classes/Mongrel/HttpRequest.html +0 -222
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000117.html +0 -28
- data/doc/rdoc/classes/Mongrel/HttpResponse.html +0 -371
- data/doc/rdoc/classes/Mongrel/URIClassifier.html +0 -301
- data/doc/rdoc/classes/RequestLog.html +0 -113
- data/doc/rdoc/classes/RequestLog/Files.html +0 -144
- data/doc/rdoc/classes/RequestLog/Objects.html +0 -144
- data/doc/rdoc/classes/RequestLog/Params.html +0 -144
- data/doc/rdoc/fr_class_index.html +0 -60
- data/doc/rdoc/fr_file_index.html +0 -40
- data/doc/rdoc/fr_method_index.html +0 -149
- data/doc/rdoc/index.html +0 -24
- data/lib/http11.bundle +0 -0
data/Rakefile
CHANGED
data/bin/mongrel_rails
CHANGED
@@ -22,7 +22,8 @@ class Start < GemPlugin::Plugin "/commands"
|
|
22
22
|
['-c', '--chdir PATH', "Change to dir before starting (will be expanded)", :@cwd, Dir.pwd],
|
23
23
|
['-r', '--root PATH', "Set the document root (default 'public')", :@docroot, "public"],
|
24
24
|
['-B', '--debug', "Enable debugging mode", :@debug, false],
|
25
|
-
['-C', '--config PATH', "Use a config file", :@config_file, nil]
|
25
|
+
['-C', '--config PATH', "Use a config file", :@config_file, nil],
|
26
|
+
['-S', '--script PATH', "Load the given file as an extra config script.", :@config_script, nil]
|
26
27
|
]
|
27
28
|
end
|
28
29
|
|
@@ -47,7 +48,7 @@ class Start < GemPlugin::Plugin "/commands"
|
|
47
48
|
settings = { :host => @address, :port => @port, :cwd => @cwd,
|
48
49
|
:log_file => @log_file, :pid_file => @pid_file, :environment => @environment,
|
49
50
|
:docroot => @docroot, :mime_map => @mime_map, :daemon => @daemon,
|
50
|
-
:debug => @debug, :includes => ["mongrel"]
|
51
|
+
:debug => @debug, :includes => ["mongrel"], :config_script => @config_script
|
51
52
|
}
|
52
53
|
|
53
54
|
if @config_file
|
@@ -57,17 +58,17 @@ class Start < GemPlugin::Plugin "/commands"
|
|
57
58
|
end
|
58
59
|
|
59
60
|
config = Mongrel::Rails::RailsConfigurator.new(settings) do
|
60
|
-
log "Starting Mongrel in #{
|
61
|
+
log "Starting Mongrel in #{defaults[:environment]} mode at #{defaults[:host]}:#{defaults[:port]}"
|
61
62
|
|
62
63
|
if defaults[:daemon]
|
63
|
-
log "Daemonizing, any open files are closed. Look at #{
|
64
|
+
log "Daemonizing, any open files are closed. Look at #{defaults[:pid_file]} and #{defaults[:log_file]} for info."
|
64
65
|
daemonize
|
65
66
|
end
|
66
67
|
|
67
68
|
listener do
|
68
69
|
mime = {}
|
69
70
|
if defaults[:mime_map]
|
70
|
-
log "Loading additional MIME types from #{
|
71
|
+
log "Loading additional MIME types from #{defaults[:mime_map]}"
|
71
72
|
mime = load_mime_map(defaults[:mime_map], mime)
|
72
73
|
end
|
73
74
|
|
@@ -76,13 +77,18 @@ class Start < GemPlugin::Plugin "/commands"
|
|
76
77
|
debug "/"
|
77
78
|
end
|
78
79
|
|
79
|
-
log "Starting Rails in environment #{
|
80
|
+
log "Starting Rails in environment #{defaults[:environment]} ..."
|
80
81
|
uri "/", :handler => rails
|
81
82
|
log "Rails loaded."
|
82
83
|
|
83
84
|
log "Loading any Rails specific GemPlugins"
|
84
85
|
load_plugins
|
85
86
|
|
87
|
+
if defaults[:config_script]
|
88
|
+
log "Loading #{defaults[:config_script]} external config script"
|
89
|
+
run_config(defaults[:config_script])
|
90
|
+
end
|
91
|
+
|
86
92
|
setup_rails_signals
|
87
93
|
end
|
88
94
|
end
|
@@ -10,15 +10,15 @@
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line 144</span>
|
14
|
+
144: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">new</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>,<span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
15
|
+
145: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@@stopit</span>
|
16
|
+
146: <span class="ruby-ivar">@@stopit</span> = <span class="ruby-keyword kw">true</span>
|
17
|
+
147: <span class="ruby-ivar">@@count</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
18
|
+
148: <span class="ruby-ivar">@@class_caller_count</span>[<span class="ruby-keyword kw">self</span>][<span class="ruby-identifier">caller</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"\n\t"</span>)] <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
19
|
+
149: <span class="ruby-ivar">@@stopit</span> = <span class="ruby-keyword kw">false</span>
|
20
|
+
150: <span class="ruby-keyword kw">end</span>
|
21
|
+
151: <span class="ruby-identifier">orig_new</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>,<span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
22
|
+
152: <span class="ruby-keyword kw">end</span></pre>
|
23
23
|
</body>
|
24
24
|
</html>
|
@@ -10,53 +10,53 @@
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line 155</span>
|
14
|
+
155: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Class</span>.<span class="ruby-identifier">report_object_creations</span>(<span class="ruby-identifier">out</span>=<span class="ruby-identifier">$stderr</span>, <span class="ruby-identifier">more_than</span>=<span class="ruby-value">20</span>)
|
15
|
+
156: <span class="ruby-constant">Class</span>.<span class="ruby-identifier">stopit</span> <span class="ruby-keyword kw">do</span>
|
16
|
+
157: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"Number of objects created = #{@@count}"</span>
|
17
|
+
158:
|
18
|
+
159: <span class="ruby-identifier">total</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">0</span>)
|
17
19
|
160:
|
18
|
-
161: <span class="ruby-identifier">
|
19
|
-
162:
|
20
|
-
163:
|
21
|
-
164:
|
22
|
-
165: <span class="ruby-
|
23
|
-
166:
|
24
|
-
167:
|
25
|
-
168: <span class="ruby-
|
26
|
-
169:
|
27
|
-
170:
|
28
|
-
171: <span class="ruby-
|
29
|
-
172:
|
30
|
-
173: <span class="ruby-keyword kw">
|
31
|
-
174: <span class="ruby-
|
32
|
-
175: <span class="ruby-keyword kw">
|
33
|
-
176:
|
34
|
-
177:
|
35
|
-
178:
|
20
|
+
161: <span class="ruby-ivar">@@class_caller_count</span>.<span class="ruby-identifier">each_key</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">klass</span><span class="ruby-operator">|</span>
|
21
|
+
162: <span class="ruby-identifier">caller_count</span> = <span class="ruby-ivar">@@class_caller_count</span>[<span class="ruby-identifier">klass</span>]
|
22
|
+
163: <span class="ruby-identifier">caller_count</span>.<span class="ruby-identifier">each_value</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">count</span><span class="ruby-operator">|</span>
|
23
|
+
164: <span class="ruby-identifier">total</span>[<span class="ruby-identifier">klass</span>] <span class="ruby-operator">+=</span> <span class="ruby-identifier">count</span>
|
24
|
+
165: <span class="ruby-keyword kw">end</span>
|
25
|
+
166: <span class="ruby-keyword kw">end</span>
|
26
|
+
167:
|
27
|
+
168: <span class="ruby-identifier">klass_list</span> = <span class="ruby-identifier">total</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">sort</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">klass_a</span>, <span class="ruby-identifier">klass_b</span><span class="ruby-operator">|</span>
|
28
|
+
169: <span class="ruby-identifier">a</span> = <span class="ruby-identifier">total</span>[<span class="ruby-identifier">klass_a</span>]
|
29
|
+
170: <span class="ruby-identifier">b</span> = <span class="ruby-identifier">total</span>[<span class="ruby-identifier">klass_b</span>]
|
30
|
+
171: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">b</span>
|
31
|
+
172: <span class="ruby-value">-1</span><span class="ruby-operator">*</span> (<span class="ruby-identifier">a</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">b</span>)
|
32
|
+
173: <span class="ruby-keyword kw">else</span>
|
33
|
+
174: <span class="ruby-identifier">klass_a</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">klass_b</span>.<span class="ruby-identifier">to_s</span>
|
34
|
+
175: <span class="ruby-keyword kw">end</span>
|
35
|
+
176: }
|
36
|
+
177:
|
37
|
+
178: <span class="ruby-identifier">below_count</span> = <span class="ruby-value">0</span>
|
36
38
|
179:
|
37
|
-
180: <span class="ruby-identifier">
|
38
|
-
181:
|
39
|
-
182:
|
40
|
-
183:
|
41
|
-
184:
|
42
|
-
185: <span class="ruby-identifier">
|
43
|
-
186:
|
44
|
-
187:
|
45
|
-
188:
|
46
|
-
189:
|
47
|
-
190: <span class="ruby-identifier">
|
48
|
-
191: <span class="ruby-keyword kw">
|
49
|
-
192:
|
50
|
-
193:
|
51
|
-
194:
|
52
|
-
195: <span class="ruby-identifier">
|
53
|
-
196: <span class="ruby-keyword kw">
|
54
|
-
197:
|
55
|
-
198:
|
56
|
-
199: <span class="ruby-keyword kw">
|
57
|
-
200:
|
58
|
-
201:
|
59
|
-
202: <span class="ruby-keyword kw">end</span>
|
60
|
-
203: <span class="ruby-keyword kw">end</span></pre>
|
39
|
+
180: <span class="ruby-identifier">klass_list</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">klass</span><span class="ruby-operator">|</span>
|
40
|
+
181: <span class="ruby-identifier">below_calls</span> = <span class="ruby-value">0</span>
|
41
|
+
182: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">total</span>[<span class="ruby-identifier">klass</span>] <span class="ruby-operator">></span> <span class="ruby-identifier">more_than</span>
|
42
|
+
183: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{total[klass]}\t#{klass} objects created."</span>
|
43
|
+
184: <span class="ruby-identifier">caller_count</span> = <span class="ruby-ivar">@@class_caller_count</span>[ <span class="ruby-identifier">klass</span>]
|
44
|
+
185: <span class="ruby-identifier">caller_count</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">sort_by</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">call</span><span class="ruby-operator">|</span> <span class="ruby-value">-1</span><span class="ruby-operator">*</span><span class="ruby-identifier">caller_count</span>[<span class="ruby-identifier">call</span>]}.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">call</span><span class="ruby-operator">|</span>
|
45
|
+
186: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">caller_count</span>[<span class="ruby-identifier">call</span>] <span class="ruby-operator">></span> <span class="ruby-identifier">more_than</span>
|
46
|
+
187: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"\t** #{caller_count[call]} #{klass} objects AT:"</span>
|
47
|
+
188: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"\t#{call}\n\n"</span>
|
48
|
+
189: <span class="ruby-keyword kw">else</span>
|
49
|
+
190: <span class="ruby-identifier">below_calls</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
50
|
+
191: <span class="ruby-keyword kw">end</span>
|
51
|
+
192: <span class="ruby-keyword kw">end</span>
|
52
|
+
193: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"\t#{below_calls} more objects had calls less that #{more_than} limit.\n\n"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">below_calls</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
53
|
+
194: <span class="ruby-keyword kw">else</span>
|
54
|
+
195: <span class="ruby-identifier">below_count</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
55
|
+
196: <span class="ruby-keyword kw">end</span>
|
56
|
+
197: <span class="ruby-keyword kw">end</span>
|
57
|
+
198:
|
58
|
+
199: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"\t** #{below_count} More objects were created but the count was below the #{more_than} limit."</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">below_count</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
59
|
+
200: <span class="ruby-keyword kw">end</span>
|
60
|
+
201: <span class="ruby-keyword kw">end</span></pre>
|
61
61
|
</body>
|
62
62
|
</html>
|
@@ -10,12 +10,12 @@
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line 203</span>
|
14
|
+
203: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Class</span>.<span class="ruby-identifier">reset_object_creations</span>
|
15
|
+
204: <span class="ruby-constant">Class</span>.<span class="ruby-identifier">stopit</span> <span class="ruby-keyword kw">do</span>
|
16
|
+
205: <span class="ruby-ivar">@@count</span> = <span class="ruby-value">0</span>
|
17
|
+
206: <span class="ruby-ivar">@@class_caller_count</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">hash</span>,<span class="ruby-identifier">key</span><span class="ruby-operator">|</span> <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">0</span>)}
|
18
|
+
207: <span class="ruby-keyword kw">end</span>
|
19
|
+
208: <span class="ruby-keyword kw">end</span></pre>
|
20
20
|
</body>
|
21
21
|
</html>
|
@@ -10,11 +10,11 @@
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line 210</span>
|
14
|
+
210: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Class</span>.<span class="ruby-identifier">stopit</span>
|
15
|
+
211: <span class="ruby-ivar">@@stopit</span> = <span class="ruby-keyword kw">true</span>
|
16
|
+
212: <span class="ruby-keyword kw">yield</span>
|
17
|
+
213: <span class="ruby-ivar">@@stopit</span> = <span class="ruby-keyword kw">false</span>
|
18
|
+
214: <span class="ruby-keyword kw">end</span></pre>
|
19
19
|
</body>
|
20
20
|
</html>
|
@@ -10,10 +10,10 @@
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line 103</span>
|
14
|
+
103: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">open</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
15
|
+
104: <span class="ruby-identifier">$open_files</span>[<span class="ruby-keyword kw">self</span>] = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">inspect</span>
|
16
|
+
105: <span class="ruby-identifier">orig_open</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>,<span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
17
|
+
106: <span class="ruby-keyword kw">end</span></pre>
|
18
18
|
</body>
|
19
19
|
</html>
|
@@ -10,10 +10,10 @@
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line 108</span>
|
14
|
+
108: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>,<span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
15
|
+
109: <span class="ruby-identifier">$open_files</span>.<span class="ruby-identifier">delete</span> <span class="ruby-keyword kw">self</span>
|
16
|
+
110: <span class="ruby-identifier">orig_close</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>,<span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
17
|
+
111: <span class="ruby-keyword kw">end</span></pre>
|
18
18
|
</body>
|
19
19
|
</html>
|
@@ -10,10 +10,10 @@
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line 118</span>
|
14
|
+
118: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">open</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
15
|
+
119: <span class="ruby-identifier">$open_files</span>[<span class="ruby-keyword kw">self</span>] = <span class="ruby-identifier">arg</span>[<span class="ruby-value">0</span>]
|
16
|
+
120: <span class="ruby-identifier">orig_open</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>,<span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
17
|
+
121: <span class="ruby-keyword kw">end</span></pre>
|
18
18
|
</body>
|
19
19
|
</html>
|
@@ -10,16 +10,16 @@
|
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line 123</span>
|
14
|
+
123: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_open_files</span>
|
15
|
+
124: <span class="ruby-constant">Class</span>.<span class="ruby-identifier">stopit</span> <span class="ruby-keyword kw">do</span>
|
16
|
+
125: <span class="ruby-identifier">open_counts</span> = {}
|
17
|
+
126: <span class="ruby-identifier">$open_files</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span>,<span class="ruby-identifier">args</span><span class="ruby-operator">|</span>
|
18
|
+
127: <span class="ruby-identifier">open_counts</span>[<span class="ruby-identifier">args</span>] <span class="ruby-operator">||=</span> <span class="ruby-value">0</span>
|
19
|
+
128: <span class="ruby-identifier">open_counts</span>[<span class="ruby-identifier">args</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
20
|
+
129: <span class="ruby-keyword kw">end</span>
|
21
|
+
130: <span class="ruby-constant">MongrelDbg</span><span class="ruby-operator">::</span><span class="ruby-identifier">trace</span>(<span class="ruby-identifier">:files</span>, <span class="ruby-identifier">open_counts</span>.<span class="ruby-identifier">to_yaml</span>)
|
22
|
+
131: <span class="ruby-keyword kw">end</span>
|
23
|
+
132: <span class="ruby-keyword kw">end</span></pre>
|
24
24
|
</body>
|
25
25
|
</html>
|
@@ -132,6 +132,7 @@ Class <a href="Mongrel/Error404Handler.html" class="link">Mongrel::Error404Handl
|
|
132
132
|
Class <a href="Mongrel/HeaderOut.html" class="link">Mongrel::HeaderOut</a><br />
|
133
133
|
Class <a href="Mongrel/HttpHandler.html" class="link">Mongrel::HttpHandler</a><br />
|
134
134
|
Class <a href="Mongrel/HttpParser.html" class="link">Mongrel::HttpParser</a><br />
|
135
|
+
Class <a href="Mongrel/HttpParserError.html" class="link">Mongrel::HttpParserError</a><br />
|
135
136
|
Class <a href="Mongrel/HttpRequest.html" class="link">Mongrel::HttpRequest</a><br />
|
136
137
|
Class <a href="Mongrel/HttpResponse.html" class="link">Mongrel::HttpResponse</a><br />
|
137
138
|
Class <a href="Mongrel/HttpServer.html" class="link">Mongrel::HttpServer</a><br />
|
@@ -31,7 +31,7 @@
|
|
31
31
|
52: <span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">on_tail</span>(<span class="ruby-value str">"--version"</span>, <span class="ruby-value str">"Show version"</span>) <span class="ruby-keyword kw">do</span>
|
32
32
|
53: <span class="ruby-ivar">@done_validating</span> = <span class="ruby-keyword kw">true</span>
|
33
33
|
54: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">VERSION</span>
|
34
|
-
55: <span class="ruby-identifier">puts</span> <span class="ruby-node">"Version #{
|
34
|
+
55: <span class="ruby-identifier">puts</span> <span class="ruby-node">"Version #{MONGREL_VERSION}"</span>
|
35
35
|
56: <span class="ruby-keyword kw">end</span>
|
36
36
|
57: <span class="ruby-keyword kw">end</span>
|
37
37
|
58:
|
@@ -10,15 +10,15 @@
|
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 589</span>
|
14
|
+
589: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">defaults</span>={}, <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
15
|
+
590: <span class="ruby-ivar">@listeners</span> = {}
|
16
|
+
591: <span class="ruby-ivar">@defaults</span> = <span class="ruby-identifier">defaults</span>
|
17
|
+
592: <span class="ruby-ivar">@needs_restart</span> = <span class="ruby-keyword kw">false</span>
|
18
|
+
593:
|
19
|
+
594: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">blk</span>
|
20
|
+
595: <span class="ruby-identifier">cloaker</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>).<span class="ruby-identifier">bind</span>(<span class="ruby-keyword kw">self</span>).<span class="ruby-identifier">call</span>
|
21
|
+
596: <span class="ruby-keyword kw">end</span>
|
22
|
+
597: <span class="ruby-keyword kw">end</span></pre>
|
23
23
|
</body>
|
24
24
|
</html>
|
@@ -10,14 +10,14 @@
|
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 600</span>
|
14
|
+
600: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cloaker</span> <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>
|
15
|
+
601: (<span class="ruby-keyword kw">class</span> <span class="ruby-operator"><<</span> <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">end</span>).<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
|
16
|
+
602: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">:cloaker_</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>
|
17
|
+
603: <span class="ruby-identifier">meth</span> = <span class="ruby-identifier">instance_method</span>( <span class="ruby-identifier">:cloaker_</span> )
|
18
|
+
604: <span class="ruby-identifier">remove_method</span> <span class="ruby-identifier">:cloaker_</span>
|
19
|
+
605: <span class="ruby-identifier">meth</span>
|
20
|
+
606: <span class="ruby-keyword kw">end</span>
|
21
|
+
607: <span class="ruby-keyword kw">end</span></pre>
|
22
22
|
</body>
|
23
23
|
</html>
|
@@ -10,9 +10,9 @@
|
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 611</span>
|
14
|
+
611: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">resolve_defaults</span>(<span class="ruby-identifier">options</span>)
|
15
|
+
612: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-ivar">@defaults</span>)
|
16
|
+
613: <span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -10,23 +10,23 @@
|
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 627</span>
|
14
|
+
627: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">listener</span>(<span class="ruby-identifier">options</span>={},<span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
15
|
+
628: <span class="ruby-identifier">ops</span> = <span class="ruby-identifier">resolve_defaults</span>(<span class="ruby-identifier">options</span>)
|
16
|
+
629: <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:num_processors</span>] <span class="ruby-operator">||=</span> <span class="ruby-value">950</span>
|
17
|
+
630: <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:timeout</span>] <span class="ruby-operator">||=</span> <span class="ruby-value">0</span>
|
18
|
+
631:
|
19
|
+
632: <span class="ruby-ivar">@listener</span> = <span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">HttpServer</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:host</span>], <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:port</span>].<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:num_processors</span>].<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:timeout</span>].<span class="ruby-identifier">to_i</span>)
|
20
|
+
633: <span class="ruby-ivar">@listener_name</span> = <span class="ruby-node">"#{ops[:host]}:#{ops[:port]}"</span>
|
21
|
+
634: <span class="ruby-ivar">@listeners</span>[<span class="ruby-ivar">@listener_name</span>] = <span class="ruby-ivar">@listener</span>
|
22
|
+
635:
|
23
|
+
636: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">blk</span>
|
24
|
+
637: <span class="ruby-identifier">cloaker</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>).<span class="ruby-identifier">bind</span>(<span class="ruby-keyword kw">self</span>).<span class="ruby-identifier">call</span>
|
25
|
+
638: <span class="ruby-keyword kw">end</span>
|
26
|
+
639:
|
27
|
+
640: <span class="ruby-comment cmt"># all done processing this listener setup</span>
|
28
|
+
641: <span class="ruby-ivar">@listener</span> = <span class="ruby-keyword kw">nil</span>
|
29
|
+
642: <span class="ruby-ivar">@listener_name</span> = <span class="ruby-keyword kw">nil</span>
|
30
|
+
643: <span class="ruby-keyword kw">end</span></pre>
|
31
31
|
</body>
|
32
32
|
</html>
|
@@ -10,10 +10,10 @@
|
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 652</span>
|
14
|
+
652: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">uri</span>(<span class="ruby-identifier">location</span>, <span class="ruby-identifier">options</span>={})
|
15
|
+
653: <span class="ruby-identifier">ops</span> = <span class="ruby-identifier">resolve_defaults</span>(<span class="ruby-identifier">options</span>)
|
16
|
+
654: <span class="ruby-ivar">@listener</span>.<span class="ruby-identifier">register</span>(<span class="ruby-identifier">location</span>, <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:handler</span>])
|
17
|
+
655: <span class="ruby-keyword kw">end</span></pre>
|
18
18
|
</body>
|
19
19
|
</html>
|