mongrel 0.3.13 → 0.3.13.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 +1 -1
- data/doc/rdoc/classes/Mongrel.html +1 -0
- data/doc/rdoc/classes/Mongrel/CGIWrapper.html +49 -49
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000098.html +11 -21
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000099.html +34 -14
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000100.html +21 -12
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000101.html +14 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000102.html +12 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000103.html +5 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000104.html +5 -6
- data/doc/rdoc/classes/Mongrel/{URIClassifier.src/M000088.html → CGIWrapper.src/M000105.html} +5 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000106.html +19 -0
- data/doc/rdoc/classes/Mongrel/Camping.html +5 -5
- data/doc/rdoc/classes/Mongrel/Camping.src/{M000046.html → M000047.html} +0 -0
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.html +10 -10
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000048.html +5 -38
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000049.html +51 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.html +65 -65
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000025.html +11 -29
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000026.html +29 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000027.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000028.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000029.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000030.html +5 -9
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000031.html +9 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000032.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000033.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000034.html +5 -11
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000035.html +11 -11
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000036.html +11 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000037.html +18 -0
- data/doc/rdoc/classes/Mongrel/Command/Registry.html +15 -15
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000038.html +7 -12
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000039.html +12 -37
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000040.html +50 -0
- data/doc/rdoc/classes/Mongrel/Configurator.html +143 -107
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000107.html +16 -7
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000108.html +18 -7
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000109.html +7 -10
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000110.html +7 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000111.html +10 -21
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000112.html +5 -6
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000113.html +21 -17
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000114.html +6 -20
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000115.html +17 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000116.html +20 -11
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000117.html +5 -6
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000118.html +11 -9
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000119.html +6 -12
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000120.html +5 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000121.html +9 -22
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000122.html +12 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000123.html +5 -20
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000124.html +22 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000125.html +18 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000126.html +33 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000127.html +18 -0
- data/doc/rdoc/classes/Mongrel/Const.html +6 -1
- data/doc/rdoc/classes/Mongrel/DeflateFilter.html +10 -10
- data/doc/rdoc/classes/Mongrel/DeflateFilter.src/{M000094.html → M000096.html} +5 -5
- data/doc/rdoc/classes/Mongrel/DeflateFilter.src/{M000095.html → M000097.html} +14 -14
- data/doc/rdoc/classes/Mongrel/DirHandler.html +31 -31
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000057.html +8 -30
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000058.html +30 -29
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000059.html +29 -50
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000060.html +50 -26
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000061.html +26 -5
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000062.html +18 -0
- data/doc/rdoc/classes/Mongrel/Error404Handler.html +10 -10
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000125.html → M000128.html} +4 -4
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000126.html → M000129.html} +4 -4
- data/doc/rdoc/classes/Mongrel/HeaderOut.html +10 -10
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000070.html +5 -5
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000071.html +18 -0
- data/doc/rdoc/classes/Mongrel/HttpHandler.html +31 -9
- data/doc/rdoc/classes/Mongrel/{URIClassifier.src/M000089.html → HttpHandler.src/M000076.html} +4 -5
- data/doc/rdoc/classes/Mongrel/HttpHandler.src/{M000075.html → M000077.html} +3 -3
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.html +30 -15
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000022.html +4 -6
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000023.html +6 -4
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000024.html +17 -0
- data/doc/rdoc/classes/Mongrel/HttpParser.html +35 -35
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000050.html +5 -6
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000051.html +7 -7
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000052.html +7 -37
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000053.html +37 -5
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000054.html +5 -5
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000055.html +5 -6
- data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000049.html → M000056.html} +6 -6
- data/doc/rdoc/classes/Mongrel/HttpRequest.html +20 -20
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000130.html → M000135.html} +38 -38
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000131.html → M000136.html} +6 -6
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000132.html → M000137.html} +6 -6
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000133.html → M000138.html} +18 -18
- data/doc/rdoc/classes/Mongrel/HttpResponse.html +61 -61
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000078.html +12 -12
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000079.html +7 -9
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000080.html +12 -9
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000081.html +9 -9
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000082.html +9 -18
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000083.html +9 -8
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000084.html +18 -7
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000085.html +8 -7
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000086.html +7 -7
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000087.html +7 -5
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000088.html +20 -0
- data/doc/rdoc/classes/Mongrel/{HeaderOut.src/M000069.html → HttpResponse.src/M000089.html} +5 -5
- data/doc/rdoc/classes/Mongrel/HttpServer.html +38 -38
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000063.html +12 -70
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000064.html +76 -13
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000065.html +13 -50
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000066.html +50 -21
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000067.html +20 -4
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000068.html +5 -9
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000069.html +22 -0
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.html +15 -15
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000041.html +26 -12
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000042.html +12 -13
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000043.html +26 -0
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.html +15 -15
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000044.html +9 -38
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000045.html +38 -10
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000046.html +23 -0
- data/doc/rdoc/classes/Mongrel/RedirectHandler.html +187 -0
- data/doc/rdoc/classes/Mongrel/RedirectHandler.src/M000133.html +22 -0
- data/doc/rdoc/classes/Mongrel/RedirectHandler.src/M000134.html +27 -0
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.html +16 -16
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000127.html → M000130.html} +10 -10
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000128.html → M000131.html} +10 -10
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000129.html → M000132.html} +4 -4
- data/doc/rdoc/classes/Mongrel/StatusHandler.html +20 -20
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000072.html +5 -11
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000073.html +11 -29
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000074.html +29 -7
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000075.html +20 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.html +30 -30
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000090.html +5 -26
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000091.html +5 -38
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000092.html +18 -15
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000093.html +25 -57
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000094.html +36 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000095.html +83 -0
- data/doc/rdoc/classes/RequestLog/Access.html +5 -5
- data/doc/rdoc/classes/RequestLog/Access.src/{M000134.html → M000139.html} +0 -0
- data/doc/rdoc/classes/RequestLog/Files.html +5 -5
- data/doc/rdoc/classes/RequestLog/Files.src/{M000135.html → M000140.html} +0 -0
- data/doc/rdoc/classes/RequestLog/Objects.html +5 -5
- data/doc/rdoc/classes/RequestLog/Objects.src/{M000137.html → M000142.html} +0 -0
- data/doc/rdoc/classes/RequestLog/Params.html +5 -5
- data/doc/rdoc/classes/RequestLog/Params.src/{M000138.html → M000143.html} +0 -0
- data/doc/rdoc/classes/RequestLog/Threads.html +5 -5
- data/doc/rdoc/classes/RequestLog/Threads.src/{M000136.html → M000141.html} +0 -0
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/ext/http11/http11_c.html +1 -1
- data/doc/rdoc/files/lib/mongrel/handlers_rb.html +1 -1
- data/doc/rdoc/files/lib/mongrel_rb.html +1 -1
- data/doc/rdoc/fr_class_index.html +1 -0
- data/doc/rdoc/fr_method_index.html +124 -119
- data/examples/simpletest.rb +2 -0
- data/ext/http11/http11.c +1 -1
- data/lib/mongrel.rb +30 -5
- data/lib/mongrel/handlers.rb +57 -2
- data/test/test_redirect_handler.rb +40 -0
- metadata +47 -38
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000096.html +0 -24
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000097.html +0 -47
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000047.html +0 -18
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000024.html +0 -24
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000037.html +0 -20
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000105.html +0 -29
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000106.html +0 -31
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000056.html +0 -21
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000076.html +0 -25
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000077.html +0 -20
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000062.html +0 -25
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000040.html +0 -39
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000043.html +0 -22
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000071.html +0 -18
@@ -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/handlers.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 330</span>
|
14
|
+
330: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">ops</span>={})
|
15
|
+
331: <span class="ruby-ivar">@sample_rate</span> = <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:sample_rate</span>] <span class="ruby-operator">||</span> <span class="ruby-value">300</span>
|
16
|
+
332:
|
17
|
+
333: <span class="ruby-ivar">@processors</span> = <span class="ruby-constant">Stats</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"processors"</span>)
|
18
|
+
334: <span class="ruby-ivar">@reqsize</span> = <span class="ruby-constant">Stats</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"request Kb"</span>)
|
19
|
+
335: <span class="ruby-ivar">@headcount</span> = <span class="ruby-constant">Stats</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"req param count"</span>)
|
20
|
+
336: <span class="ruby-ivar">@respsize</span> = <span class="ruby-constant">Stats</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"response Kb"</span>)
|
21
|
+
337: <span class="ruby-ivar">@interreq</span> = <span class="ruby-constant">Stats</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"inter-request time"</span>)
|
22
|
+
338: <span class="ruby-keyword kw">end</span></pre>
|
23
23
|
</body>
|
24
24
|
</html>
|
@@ -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/handlers.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 341</span>
|
14
|
+
341: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process</span>(<span class="ruby-identifier">request</span>, <span class="ruby-identifier">response</span>)
|
15
|
+
342: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rand</span>(<span class="ruby-ivar">@sample_rate</span>)<span class="ruby-operator">+</span><span class="ruby-value">1</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@sample_rate</span>
|
16
|
+
343: <span class="ruby-ivar">@processors</span>.<span class="ruby-identifier">sample</span>(<span class="ruby-identifier">listener</span>.<span class="ruby-identifier">workers</span>.<span class="ruby-identifier">list</span>.<span class="ruby-identifier">length</span>)
|
17
|
+
344: <span class="ruby-ivar">@headcount</span>.<span class="ruby-identifier">sample</span>(<span class="ruby-identifier">request</span>.<span class="ruby-identifier">params</span>.<span class="ruby-identifier">length</span>)
|
18
|
+
345: <span class="ruby-ivar">@reqsize</span>.<span class="ruby-identifier">sample</span>(<span class="ruby-identifier">request</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">/</span> <span class="ruby-value">1024.0</span>)
|
19
|
+
346: <span class="ruby-ivar">@respsize</span>.<span class="ruby-identifier">sample</span>((<span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">header</span>.<span class="ruby-identifier">out</span>.<span class="ruby-identifier">length</span>) <span class="ruby-operator">/</span> <span class="ruby-value">1024.0</span>)
|
20
|
+
347: <span class="ruby-keyword kw">end</span>
|
21
|
+
348: <span class="ruby-ivar">@interreq</span>.<span class="ruby-identifier">tick</span>
|
22
|
+
349: <span class="ruby-keyword kw">end</span></pre>
|
23
23
|
</body>
|
24
24
|
</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/handlers.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 351</span>
|
14
|
+
351: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump</span>
|
15
|
+
352: <span class="ruby-node">"#{@processors.to_s}\n#{@reqsize.to_s}\n#{@headcount.to_s}\n#{@respsize.to_s}\n#{@interreq.to_s}"</span>
|
16
|
+
353: <span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -96,10 +96,10 @@ statistics on how <a href="../Mongrel.html">Mongrel</a> is doing.
|
|
96
96
|
<h3 class="section-bar">Methods</h3>
|
97
97
|
|
98
98
|
<div class="name-list">
|
99
|
-
<a href="#
|
100
|
-
<a href="#
|
101
|
-
<a href="#
|
102
|
-
<a href="#
|
99
|
+
<a href="#M000074">describe_listener</a>
|
100
|
+
<a href="#M000072">new</a>
|
101
|
+
<a href="#M000075">process</a>
|
102
|
+
<a href="#M000073">table</a>
|
103
103
|
</div>
|
104
104
|
</div>
|
105
105
|
|
@@ -121,12 +121,12 @@ statistics on how <a href="../Mongrel.html">Mongrel</a> is doing.
|
|
121
121
|
<div id="methods">
|
122
122
|
<h3 class="section-bar">Public Class methods</h3>
|
123
123
|
|
124
|
-
<div id="method-
|
125
|
-
<a name="
|
124
|
+
<div id="method-M000072" class="method-detail">
|
125
|
+
<a name="M000072"></a>
|
126
126
|
|
127
127
|
<div class="method-heading">
|
128
|
-
<a href="StatusHandler.src/
|
129
|
-
onclick="popupCode('StatusHandler.src/
|
128
|
+
<a href="StatusHandler.src/M000072.html" target="Code" class="method-signature"
|
129
|
+
onclick="popupCode('StatusHandler.src/M000072.html');return false;">
|
130
130
|
<span class="method-name">new</span><span class="method-args">(ops={})</span>
|
131
131
|
</a>
|
132
132
|
</div>
|
@@ -137,12 +137,12 @@ statistics on how <a href="../Mongrel.html">Mongrel</a> is doing.
|
|
137
137
|
|
138
138
|
<h3 class="section-bar">Public Instance methods</h3>
|
139
139
|
|
140
|
-
<div id="method-
|
141
|
-
<a name="
|
140
|
+
<div id="method-M000074" class="method-detail">
|
141
|
+
<a name="M000074"></a>
|
142
142
|
|
143
143
|
<div class="method-heading">
|
144
|
-
<a href="StatusHandler.src/
|
145
|
-
onclick="popupCode('StatusHandler.src/
|
144
|
+
<a href="StatusHandler.src/M000074.html" target="Code" class="method-signature"
|
145
|
+
onclick="popupCode('StatusHandler.src/M000074.html');return false;">
|
146
146
|
<span class="method-name">describe_listener</span><span class="method-args">()</span>
|
147
147
|
</a>
|
148
148
|
</div>
|
@@ -151,12 +151,12 @@ statistics on how <a href="../Mongrel.html">Mongrel</a> is doing.
|
|
151
151
|
</div>
|
152
152
|
</div>
|
153
153
|
|
154
|
-
<div id="method-
|
155
|
-
<a name="
|
154
|
+
<div id="method-M000075" class="method-detail">
|
155
|
+
<a name="M000075"></a>
|
156
156
|
|
157
157
|
<div class="method-heading">
|
158
|
-
<a href="StatusHandler.src/
|
159
|
-
onclick="popupCode('StatusHandler.src/
|
158
|
+
<a href="StatusHandler.src/M000075.html" target="Code" class="method-signature"
|
159
|
+
onclick="popupCode('StatusHandler.src/M000075.html');return false;">
|
160
160
|
<span class="method-name">process</span><span class="method-args">(request, response)</span>
|
161
161
|
</a>
|
162
162
|
</div>
|
@@ -165,12 +165,12 @@ statistics on how <a href="../Mongrel.html">Mongrel</a> is doing.
|
|
165
165
|
</div>
|
166
166
|
</div>
|
167
167
|
|
168
|
-
<div id="method-
|
169
|
-
<a name="
|
168
|
+
<div id="method-M000073" class="method-detail">
|
169
|
+
<a name="M000073"></a>
|
170
170
|
|
171
171
|
<div class="method-heading">
|
172
|
-
<a href="StatusHandler.src/
|
173
|
-
onclick="popupCode('StatusHandler.src/
|
172
|
+
<a href="StatusHandler.src/M000073.html" target="Code" class="method-signature"
|
173
|
+
onclick="popupCode('StatusHandler.src/M000073.html');return false;">
|
174
174
|
<span class="method-name">table</span><span class="method-args">(title, rows)</span>
|
175
175
|
</a>
|
176
176
|
</div>
|
@@ -5,20 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>new (Mongrel::StatusHandler)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
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/handlers.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
356: <span class="ruby-identifier">results</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"<tr>"</span>
|
18
|
-
357: <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">col</span><span class="ruby-operator">|</span> <span class="ruby-identifier">results</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"<td>#{col}</td>"</span> }
|
19
|
-
358: <span class="ruby-identifier">results</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"</tr>"</span>
|
20
|
-
359: <span class="ruby-keyword kw">end</span>
|
21
|
-
360: <span class="ruby-identifier">results</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"</table>"</span>
|
22
|
-
361: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 360</span>
|
14
|
+
360: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">ops</span>={})
|
15
|
+
361: <span class="ruby-ivar">@stats</span> = <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:stats_filter</span>]
|
16
|
+
362: <span class="ruby-keyword kw">end</span></pre>
|
23
17
|
</body>
|
24
18
|
</html>
|
@@ -5,38 +5,20 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>table (Mongrel::StatusHandler)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
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/handlers.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
372:
|
24
|
-
373: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@stats</span>
|
25
|
-
374: <span class="ruby-identifier">results</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"<h2>Statistics</h2><p>N means the number of samples, pay attention to MEAN, SD, MIN and MAX."</span>
|
26
|
-
375: <span class="ruby-identifier">results</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"<pre>#{@stats.dump}</pre>"</span>
|
27
|
-
376: <span class="ruby-keyword kw">end</span>
|
28
|
-
377:
|
29
|
-
378: <span class="ruby-identifier">results</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"<h2>Registered Handlers</h2>"</span>
|
30
|
-
379: <span class="ruby-identifier">uris</span> = <span class="ruby-identifier">listener</span>.<span class="ruby-identifier">classifier</span>.<span class="ruby-identifier">handler_map</span>
|
31
|
-
380: <span class="ruby-identifier">results</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">table</span>(<span class="ruby-value str">"handlers"</span>, <span class="ruby-identifier">uris</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">uri</span>,<span class="ruby-identifier">handlers</span><span class="ruby-operator">|</span>
|
32
|
-
381: [<span class="ruby-identifier">uri</span>,
|
33
|
-
382: <span class="ruby-value str">"<pre>"</span> <span class="ruby-operator">+</span>
|
34
|
-
383: <span class="ruby-identifier">handlers</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">h</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">to_s</span> }.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"\n"</span>) <span class="ruby-operator">+</span>
|
35
|
-
384: <span class="ruby-value str">"</pre>"</span>
|
36
|
-
385: ]
|
37
|
-
386: })
|
38
|
-
387:
|
39
|
-
388: <span class="ruby-identifier">results</span>
|
40
|
-
389: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 364</span>
|
14
|
+
364: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">table</span>(<span class="ruby-identifier">title</span>, <span class="ruby-identifier">rows</span>)
|
15
|
+
365: <span class="ruby-identifier">results</span> = <span class="ruby-node">"<table border=\"1\"><tr><th colspan=\"#{rows[0].length}\">#{title}</th></tr>"</span>
|
16
|
+
366: <span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">cols</span><span class="ruby-operator">|</span>
|
17
|
+
367: <span class="ruby-identifier">results</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"<tr>"</span>
|
18
|
+
368: <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">col</span><span class="ruby-operator">|</span> <span class="ruby-identifier">results</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"<td>#{col}</td>"</span> }
|
19
|
+
369: <span class="ruby-identifier">results</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"</tr>"</span>
|
20
|
+
370: <span class="ruby-keyword kw">end</span>
|
21
|
+
371: <span class="ruby-identifier">results</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"</table>"</span>
|
22
|
+
372: <span class="ruby-keyword kw">end</span></pre>
|
41
23
|
</body>
|
42
24
|
</html>
|
@@ -5,16 +5,38 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>describe_listener (Mongrel::StatusHandler)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
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/handlers.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 374</span>
|
14
|
+
374: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">describe_listener</span>
|
15
|
+
375: <span class="ruby-identifier">results</span> = <span class="ruby-value str">""</span>
|
16
|
+
376: <span class="ruby-identifier">results</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"<h1>Listener #{listener.host}:#{listener.port}</h1>"</span>
|
17
|
+
377: <span class="ruby-identifier">results</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">table</span>(<span class="ruby-value str">"settings"</span>, [
|
18
|
+
378: [<span class="ruby-value str">"host"</span>,<span class="ruby-identifier">listener</span>.<span class="ruby-identifier">host</span>],
|
19
|
+
379: [<span class="ruby-value str">"port"</span>,<span class="ruby-identifier">listener</span>.<span class="ruby-identifier">port</span>],
|
20
|
+
380: [<span class="ruby-value str">"timeout"</span>,<span class="ruby-identifier">listener</span>.<span class="ruby-identifier">timeout</span>],
|
21
|
+
381: [<span class="ruby-value str">"workers max"</span>,<span class="ruby-identifier">listener</span>.<span class="ruby-identifier">num_processors</span>],
|
22
|
+
382: ])
|
23
|
+
383:
|
24
|
+
384: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@stats</span>
|
25
|
+
385: <span class="ruby-identifier">results</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"<h2>Statistics</h2><p>N means the number of samples, pay attention to MEAN, SD, MIN and MAX."</span>
|
26
|
+
386: <span class="ruby-identifier">results</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"<pre>#{@stats.dump}</pre>"</span>
|
27
|
+
387: <span class="ruby-keyword kw">end</span>
|
28
|
+
388:
|
29
|
+
389: <span class="ruby-identifier">results</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"<h2>Registered Handlers</h2>"</span>
|
30
|
+
390: <span class="ruby-identifier">uris</span> = <span class="ruby-identifier">listener</span>.<span class="ruby-identifier">classifier</span>.<span class="ruby-identifier">handler_map</span>
|
31
|
+
391: <span class="ruby-identifier">results</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">table</span>(<span class="ruby-value str">"handlers"</span>, <span class="ruby-identifier">uris</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">uri</span>,<span class="ruby-identifier">handlers</span><span class="ruby-operator">|</span>
|
32
|
+
392: [<span class="ruby-identifier">uri</span>,
|
33
|
+
393: <span class="ruby-value str">"<pre>"</span> <span class="ruby-operator">+</span>
|
34
|
+
394: <span class="ruby-identifier">handlers</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">h</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">to_s</span> }.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"\n"</span>) <span class="ruby-operator">+</span>
|
35
|
+
395: <span class="ruby-value str">"</pre>"</span>
|
36
|
+
396: ]
|
37
|
+
397: })
|
38
|
+
398:
|
39
|
+
399: <span class="ruby-identifier">results</span>
|
40
|
+
400: <span class="ruby-keyword kw">end</span></pre>
|
19
41
|
</body>
|
20
42
|
</html>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>process (Mongrel::StatusHandler)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 402</span>
|
14
|
+
402: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process</span>(<span class="ruby-identifier">request</span>, <span class="ruby-identifier">response</span>)
|
15
|
+
403: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">start</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">head</span>,<span class="ruby-identifier">out</span><span class="ruby-operator">|</span>
|
16
|
+
404: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">write</span> <span class="ruby-value str">"<html><body><title>Mongrel Server Status</title>\n\#{describe_listener}\n</body></html>\n"</span>
|
17
|
+
405: <span class="ruby-keyword kw">end</span>
|
18
|
+
406: <span class="ruby-keyword kw">end</span></pre>
|
19
|
+
</body>
|
20
|
+
</html>
|
@@ -90,12 +90,12 @@
|
|
90
90
|
<h3 class="section-bar">Methods</h3>
|
91
91
|
|
92
92
|
<div class="name-list">
|
93
|
-
<a href="#
|
94
|
-
<a href="#
|
95
|
-
<a href="#
|
96
|
-
<a href="#
|
97
|
-
<a href="#
|
98
|
-
<a href="#
|
93
|
+
<a href="#M000091">inspect</a>
|
94
|
+
<a href="#M000092">new</a>
|
95
|
+
<a href="#M000093">register</a>
|
96
|
+
<a href="#M000095">resolve</a>
|
97
|
+
<a href="#M000094">unregister</a>
|
98
|
+
<a href="#M000090">uris</a>
|
99
99
|
</div>
|
100
100
|
</div>
|
101
101
|
|
@@ -130,12 +130,12 @@
|
|
130
130
|
<div id="methods">
|
131
131
|
<h3 class="section-bar">Public Class methods</h3>
|
132
132
|
|
133
|
-
<div id="method-
|
134
|
-
<a name="
|
133
|
+
<div id="method-M000092" class="method-detail">
|
134
|
+
<a name="M000092"></a>
|
135
135
|
|
136
136
|
<div class="method-heading">
|
137
|
-
<a href="URIClassifier.src/
|
138
|
-
onclick="popupCode('URIClassifier.src/
|
137
|
+
<a href="URIClassifier.src/M000092.html" target="Code" class="method-signature"
|
138
|
+
onclick="popupCode('URIClassifier.src/M000092.html');return false;">
|
139
139
|
<span class="method-name">URIClassifier.new → URIClassifier<br />
|
140
140
|
</span>
|
141
141
|
</a>
|
@@ -162,12 +162,12 @@ portion.
|
|
162
162
|
|
163
163
|
<h3 class="section-bar">Public Instance methods</h3>
|
164
164
|
|
165
|
-
<div id="method-
|
166
|
-
<a name="
|
165
|
+
<div id="method-M000091" class="method-detail">
|
166
|
+
<a name="M000091"></a>
|
167
167
|
|
168
168
|
<div class="method-heading">
|
169
|
-
<a href="URIClassifier.src/
|
170
|
-
onclick="popupCode('URIClassifier.src/
|
169
|
+
<a href="URIClassifier.src/M000091.html" target="Code" class="method-signature"
|
170
|
+
onclick="popupCode('URIClassifier.src/M000091.html');return false;">
|
171
171
|
<span class="method-name">inspect</span><span class="method-args">()</span>
|
172
172
|
</a>
|
173
173
|
</div>
|
@@ -179,12 +179,12 @@ Simply does an inspect that looks like a Hash inspect.
|
|
179
179
|
</div>
|
180
180
|
</div>
|
181
181
|
|
182
|
-
<div id="method-
|
183
|
-
<a name="
|
182
|
+
<div id="method-M000093" class="method-detail">
|
183
|
+
<a name="M000093"></a>
|
184
184
|
|
185
185
|
<div class="method-heading">
|
186
|
-
<a href="URIClassifier.src/
|
187
|
-
onclick="popupCode('URIClassifier.src/
|
186
|
+
<a href="URIClassifier.src/M000093.html" target="Code" class="method-signature"
|
187
|
+
onclick="popupCode('URIClassifier.src/M000093.html');return false;">
|
188
188
|
<span class="method-name">uc.register("/someuri", SampleHandler.new) → nil<br />
|
189
189
|
</span>
|
190
190
|
</a>
|
@@ -209,12 +209,12 @@ to get right with a Hash.
|
|
209
209
|
</div>
|
210
210
|
</div>
|
211
211
|
|
212
|
-
<div id="method-
|
213
|
-
<a name="
|
212
|
+
<div id="method-M000095" class="method-detail">
|
213
|
+
<a name="M000095"></a>
|
214
214
|
|
215
215
|
<div class="method-heading">
|
216
|
-
<a href="URIClassifier.src/
|
217
|
-
onclick="popupCode('URIClassifier.src/
|
216
|
+
<a href="URIClassifier.src/M000095.html" target="Code" class="method-signature"
|
217
|
+
onclick="popupCode('URIClassifier.src/M000095.html');return false;">
|
218
218
|
<span class="method-name">uc.resolve("/someuri") → "/someuri", "", handler<br />
|
219
219
|
uc.resolve("/someuri/pathinfo") → "/someuri", "/pathinfo", handler<br />
|
220
220
|
uc.resolve("/notfound/orhere") → nil, nil, nil<br />
|
@@ -261,12 +261,12 @@ Don‘t try other string-like stuff yet.
|
|
261
261
|
</div>
|
262
262
|
</div>
|
263
263
|
|
264
|
-
<div id="method-
|
265
|
-
<a name="
|
264
|
+
<div id="method-M000094" class="method-detail">
|
265
|
+
<a name="M000094"></a>
|
266
266
|
|
267
267
|
<div class="method-heading">
|
268
|
-
<a href="URIClassifier.src/
|
269
|
-
onclick="popupCode('URIClassifier.src/
|
268
|
+
<a href="URIClassifier.src/M000094.html" target="Code" class="method-signature"
|
269
|
+
onclick="popupCode('URIClassifier.src/M000094.html');return false;">
|
270
270
|
<span class="method-name">uc.unregister("/someuri")<br />
|
271
271
|
</span>
|
272
272
|
</a>
|
@@ -279,12 +279,12 @@ Yep, just removes this uri and it’s handler from the trie.
|
|
279
279
|
</div>
|
280
280
|
</div>
|
281
281
|
|
282
|
-
<div id="method-
|
283
|
-
<a name="
|
282
|
+
<div id="method-M000090" class="method-detail">
|
283
|
+
<a name="M000090"></a>
|
284
284
|
|
285
285
|
<div class="method-heading">
|
286
|
-
<a href="URIClassifier.src/
|
287
|
-
onclick="popupCode('URIClassifier.src/
|
286
|
+
<a href="URIClassifier.src/M000090.html" target="Code" class="method-signature"
|
287
|
+
onclick="popupCode('URIClassifier.src/M000090.html');return false;">
|
288
288
|
<span class="method-name">uris</span><span class="method-args">()</span>
|
289
289
|
</a>
|
290
290
|
</div>
|
@@ -5,35 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>uris (Mongrel::URIClassifier)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
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
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
* Initializes a new URIClassifier object that you can use to associate URI sequences
|
18
|
-
* with objects. You can actually use it with any string sequence and any objects,
|
19
|
-
* but it's mostly used with URIs.
|
20
|
-
*
|
21
|
-
* It uses TST from http://www.octavian.org/cs/software.html to build an ternary search
|
22
|
-
* trie to hold all of the URIs. It uses this to do an initial search for the a URI
|
23
|
-
* prefix, and then to break the URI into SCRIPT_NAME and PATH_INFO portions. It actually
|
24
|
-
* will do two searches most of the time in order to find the right handler for the
|
25
|
-
* registered prefix portion.
|
26
|
-
*
|
27
|
-
*/
|
28
|
-
VALUE URIClassifier_init(VALUE self)
|
29
|
-
{
|
30
|
-
VALUE hash;
|
31
|
-
|
32
|
-
// we create an internal hash to protect stuff from the GC
|
33
|
-
hash = rb_hash_new();
|
34
|
-
rb_ivar_set(self, id_handler_map, hash);
|
35
|
-
|
36
|
-
return self;
|
37
|
-
}</pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 53</span>
|
14
|
+
53: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">uris</span>
|
15
|
+
54: <span class="ruby-ivar">@handler_map</span>.<span class="ruby-identifier">keys</span>
|
16
|
+
55: <span class="ruby-keyword kw">end</span></pre>
|
38
17
|
</body>
|
39
18
|
</html>
|