mongrel 0.3.13.1 → 0.3.13.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +3 -1
- data/doc/rdoc/classes/Mongrel.html +3 -2
- data/doc/rdoc/classes/Mongrel/CGIWrapper.html +49 -49
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000101.html +11 -14
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000102.html +34 -12
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000103.html +21 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000104.html +14 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000105.html +12 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000106.html +5 -6
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000107.html +18 -0
- data/doc/rdoc/classes/Mongrel/{URIClassifier.src/M000090.html → CGIWrapper.src/M000108.html} +5 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000109.html +19 -0
- data/doc/rdoc/classes/Mongrel/Camping.html +5 -5
- data/doc/rdoc/classes/Mongrel/Camping.src/{M000047.html → M000048.html} +0 -0
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.html +10 -10
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000049.html +5 -38
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000050.html +51 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.html +65 -65
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000026.html +11 -29
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000027.html +29 -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 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000031.html +5 -9
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000032.html +9 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000033.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000034.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000035.html +5 -11
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000036.html +11 -11
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000037.html +11 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000038.html +18 -0
- data/doc/rdoc/classes/Mongrel/Command/Registry.html +15 -15
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000039.html +7 -12
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000040.html +12 -37
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000041.html +50 -0
- data/doc/rdoc/classes/Mongrel/Configurator.html +120 -114
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000110.html +14 -7
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000111.html +18 -10
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000112.html +7 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000113.html +7 -21
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000114.html +10 -6
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000115.html +5 -17
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000116.html +25 -20
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000117.html +6 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000118.html +17 -11
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000119.html +20 -6
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000120.html +5 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000121.html +11 -9
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000122.html +6 -12
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000123.html +5 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000124.html +9 -22
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000125.html +12 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000126.html +5 -20
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000127.html +22 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000128.html +18 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000129.html +33 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000130.html +18 -0
- data/doc/rdoc/classes/Mongrel/Const.html +1 -1
- data/doc/rdoc/classes/Mongrel/DeflateFilter.html +10 -10
- data/doc/rdoc/classes/Mongrel/DeflateFilter.src/{M000096.html → M000099.html} +5 -5
- data/doc/rdoc/classes/Mongrel/DeflateFilter.src/{M000097.html → M000100.html} +14 -14
- data/doc/rdoc/classes/Mongrel/DirHandler.html +31 -31
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000058.html +8 -30
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000059.html +30 -29
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000060.html +29 -50
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000061.html +50 -26
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000062.html +26 -5
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000063.html +18 -0
- data/doc/rdoc/classes/Mongrel/Error404Handler.html +10 -10
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000128.html → M000131.html} +4 -4
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000129.html → M000132.html} +4 -4
- data/doc/rdoc/classes/Mongrel/HeaderOut.html +10 -10
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/{M000070.html → M000072.html} +4 -4
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/{M000071.html → M000073.html} +4 -4
- data/doc/rdoc/classes/Mongrel/HttpHandler.html +31 -10
- data/doc/rdoc/classes/Mongrel/HttpHandler.src/{M000076.html → M000078.html} +0 -0
- data/doc/rdoc/classes/Mongrel/HttpHandler.src/M000079.html +17 -0
- data/doc/rdoc/classes/Mongrel/HttpHandler.src/{M000077.html → M000080.html} +3 -3
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.html +25 -10
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000022.html +3 -3
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000023.html +4 -6
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000024.html +6 -4
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000025.html +17 -0
- data/doc/rdoc/classes/Mongrel/HttpParser.html +35 -35
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000051.html +5 -6
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000052.html +7 -7
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000053.html +7 -37
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000054.html +37 -5
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000055.html +5 -5
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000056.html +5 -6
- data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000050.html → M000057.html} +6 -6
- data/doc/rdoc/classes/Mongrel/HttpRequest.html +30 -21
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000138.html +43 -19
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000136.html → M000139.html} +6 -6
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000137.html → M000140.html} +6 -6
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000141.html +32 -0
- data/doc/rdoc/classes/Mongrel/HttpResponse.html +61 -61
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000081.html +12 -9
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000082.html +7 -9
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000083.html +12 -9
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000084.html +9 -18
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000085.html +9 -8
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000086.html +9 -7
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000087.html +18 -7
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000088.html +8 -7
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000089.html +7 -5
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000090.html +20 -0
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000091.html +20 -0
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000092.html +18 -0
- data/doc/rdoc/classes/Mongrel/HttpServer.html +63 -41
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000064.html +12 -76
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000065.html +74 -13
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000066.html +18 -50
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000067.html +8 -21
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000068.html +38 -5
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000069.html +21 -9
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000070.html +18 -0
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000071.html +22 -0
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.html +15 -15
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000042.html +26 -12
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000043.html +12 -13
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000044.html +26 -0
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.html +15 -15
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000045.html +9 -38
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000046.html +38 -10
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000047.html +23 -0
- data/doc/rdoc/classes/Mongrel/RedirectHandler.html +10 -10
- data/doc/rdoc/classes/Mongrel/RedirectHandler.src/{M000133.html → M000136.html} +8 -8
- data/doc/rdoc/classes/Mongrel/RedirectHandler.src/{M000134.html → M000137.html} +13 -13
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.html +16 -16
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000130.html → M000133.html} +10 -10
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000131.html → M000134.html} +10 -10
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000132.html → M000135.html} +4 -4
- data/doc/rdoc/classes/Mongrel/StatusHandler.html +20 -20
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000074.html +5 -29
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000075.html +11 -7
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000076.html +42 -0
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000077.html +20 -0
- data/doc/rdoc/classes/Mongrel/TimeoutError.html +117 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.html +30 -30
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000093.html +5 -38
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000094.html +5 -23
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000095.html +16 -60
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000096.html +51 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000097.html +36 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000098.html +83 -0
- data/doc/rdoc/classes/RequestLog/Access.html +5 -5
- data/doc/rdoc/classes/RequestLog/Access.src/{M000139.html → M000142.html} +0 -0
- data/doc/rdoc/classes/RequestLog/Files.html +5 -5
- data/doc/rdoc/classes/RequestLog/Files.src/{M000140.html → M000143.html} +0 -0
- data/doc/rdoc/classes/RequestLog/Objects.html +5 -5
- data/doc/rdoc/classes/RequestLog/Objects.src/{M000142.html → M000145.html} +0 -0
- data/doc/rdoc/classes/RequestLog/Params.html +5 -5
- data/doc/rdoc/classes/RequestLog/Params.src/{M000143.html → M000146.html} +0 -0
- data/doc/rdoc/classes/RequestLog/Threads.html +5 -5
- data/doc/rdoc/classes/RequestLog/Threads.src/{M000141.html → M000144.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/camping_rb.html +2 -2
- data/doc/rdoc/files/lib/mongrel/cgi_rb.html +2 -2
- data/doc/rdoc/files/lib/mongrel/command_rb.html +2 -2
- data/doc/rdoc/files/lib/mongrel/debug_rb.html +2 -2
- data/doc/rdoc/files/lib/mongrel/handlers_rb.html +1 -1
- data/doc/rdoc/files/lib/mongrel/init_rb.html +2 -2
- data/doc/rdoc/files/lib/mongrel/rails_rb.html +2 -2
- data/doc/rdoc/files/lib/mongrel/stats_rb.html +2 -2
- data/doc/rdoc/files/lib/mongrel/tcphack_rb.html +2 -2
- data/doc/rdoc/files/lib/mongrel_rb.html +2 -2
- data/doc/rdoc/fr_class_index.html +1 -0
- data/doc/rdoc/fr_method_index.html +125 -122
- data/ext/http11/http11.c +2 -2
- data/ext/http11/http11_parser.c +1 -1
- data/ext/http11/http11_parser.h +1 -1
- data/lib/mongrel.rb +70 -53
- data/lib/mongrel/camping.rb +1 -1
- data/lib/mongrel/cgi.rb +1 -1
- data/lib/mongrel/command.rb +1 -1
- data/lib/mongrel/debug.rb +1 -1
- data/lib/mongrel/handlers.rb +10 -1
- data/lib/mongrel/init.rb +1 -1
- data/lib/mongrel/rails.rb +1 -1
- data/lib/mongrel/stats.rb +1 -1
- data/lib/mongrel/tcphack.rb +1 -1
- data/test/test_command.rb +1 -1
- data/test/test_conditional.rb +1 -1
- data/test/test_configurator.rb +1 -1
- data/test/test_debug.rb +1 -1
- data/test/test_handlers.rb +1 -1
- data/test/test_http11.rb +1 -1
- data/test/test_response.rb +1 -1
- data/test/test_stats.rb +1 -1
- data/test/test_uriclassifier.rb +1 -1
- data/test/test_ws.rb +1 -1
- data/tools/trickletest.rb +28 -20
- metadata +50 -46
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000098.html +0 -24
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000099.html +0 -47
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000100.html +0 -34
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000048.html +0 -18
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000025.html +0 -24
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000038.html +0 -20
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000107.html +0 -29
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000108.html +0 -31
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000109.html +0 -20
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000057.html +0 -21
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000135.html +0 -52
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000078.html +0 -25
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000079.html +0 -20
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000080.html +0 -25
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000063.html +0 -25
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000041.html +0 -39
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000044.html +0 -22
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000072.html +0 -18
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000073.html +0 -24
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000091.html +0 -18
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000092.html +0 -39
@@ -5,14 +5,21 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>stop (Mongrel::Configurator)</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
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 979</span>
|
14
|
+
979: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stop</span>(<span class="ruby-identifier">needs_restart</span>=<span class="ruby-keyword kw">false</span>, <span class="ruby-identifier">unlink_pid_file</span>=<span class="ruby-keyword kw">true</span>)
|
15
|
+
980: <span class="ruby-ivar">@listeners</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">name</span>,<span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
|
16
|
+
981: <span class="ruby-identifier">s</span>.<span class="ruby-identifier">stop</span>
|
17
|
+
982: }
|
18
|
+
983:
|
19
|
+
984: <span class="ruby-ivar">@needs_restart</span> = <span class="ruby-identifier">needs_restart</span>
|
20
|
+
985: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">unlink_pid_file</span>
|
21
|
+
986: <span class="ruby-constant">File</span>.<span class="ruby-identifier">unlink</span> <span class="ruby-ivar">@pid_file</span> <span class="ruby-keyword kw">if</span> (<span class="ruby-ivar">@pid_file</span> <span class="ruby-keyword kw">and</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-ivar">@pid_file</span>))
|
22
|
+
987: <span class="ruby-keyword kw">end</span>
|
23
|
+
988: <span class="ruby-keyword kw">end</span></pre>
|
17
24
|
</body>
|
18
25
|
</html>
|
@@ -5,29 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>join (Mongrel::Configurator)</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
|
-
1039: <span class="ruby-comment cmt"># forced shutdown, even if previously restarted (actually just like TERM but for CTRL-C)</span>
|
18
|
-
1040: <span class="ruby-identifier">trap</span>(<span class="ruby-value str">"INT"</span>) { <span class="ruby-identifier">log</span> <span class="ruby-value str">"INT signal received."</span>; <span class="ruby-identifier">stop</span>(<span class="ruby-identifier">need_restart</span>=<span class="ruby-keyword kw">false</span>) }
|
19
|
-
1041:
|
20
|
-
1042: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/mswin/</span>
|
21
|
-
1043: <span class="ruby-comment cmt"># graceful shutdown</span>
|
22
|
-
1044: <span class="ruby-identifier">trap</span>(<span class="ruby-value str">"TERM"</span>) { <span class="ruby-identifier">log</span> <span class="ruby-value str">"TERM signal received."</span>; <span class="ruby-identifier">stop</span> }
|
23
|
-
1045:
|
24
|
-
1046: <span class="ruby-comment cmt"># restart</span>
|
25
|
-
1047: <span class="ruby-identifier">trap</span>(<span class="ruby-value str">"USR2"</span>) { <span class="ruby-identifier">log</span> <span class="ruby-value str">"USR2 signal received."</span>; <span class="ruby-identifier">stop</span>(<span class="ruby-identifier">need_restart</span>=<span class="ruby-keyword kw">true</span>) }
|
26
|
-
1048:
|
27
|
-
1049: <span class="ruby-identifier">log</span> <span class="ruby-value str">"Signals ready. TERM => stop. USR2 => restart. INT => stop (no restart)."</span>
|
28
|
-
1050: <span class="ruby-keyword kw">else</span>
|
29
|
-
1051: <span class="ruby-identifier">log</span> <span class="ruby-value str">"Signals ready. INT => stop (no restart)."</span>
|
30
|
-
1052: <span class="ruby-keyword kw">end</span>
|
31
|
-
1053: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 994</span>
|
14
|
+
994: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">join</span>
|
15
|
+
995: <span class="ruby-ivar">@listeners</span>.<span class="ruby-identifier">values</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">acceptor</span>.<span class="ruby-identifier">join</span> }
|
16
|
+
996: <span class="ruby-keyword kw">end</span></pre>
|
32
17
|
</body>
|
33
18
|
</html>
|
@@ -5,14 +5,31 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>debug (Mongrel::Configurator)</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.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 1014</span>
|
14
|
+
1014: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">debug</span>(<span class="ruby-identifier">location</span>, <span class="ruby-identifier">what</span> = [<span class="ruby-identifier">:object</span>, <span class="ruby-identifier">:rails</span>, <span class="ruby-identifier">:files</span>, <span class="ruby-identifier">:threads</span>, <span class="ruby-identifier">:params</span>])
|
15
|
+
1015: <span class="ruby-identifier">require</span> <span class="ruby-value str">'mongrel/debug'</span>
|
16
|
+
1016: <span class="ruby-identifier">handlers</span> = {
|
17
|
+
1017: <span class="ruby-identifier">:files</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"/handlers/requestlog::access"</span>,
|
18
|
+
1018: <span class="ruby-identifier">:rails</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"/handlers/requestlog::files"</span>,
|
19
|
+
1019: <span class="ruby-identifier">:object</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"/handlers/requestlog::objects"</span>,
|
20
|
+
1020: <span class="ruby-identifier">:threads</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"/handlers/requestlog::threads"</span>,
|
21
|
+
1021: <span class="ruby-identifier">:params</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"/handlers/requestlog::params"</span>
|
22
|
+
1022: }
|
23
|
+
1023:
|
24
|
+
1024: <span class="ruby-comment cmt"># turn on the debugging infrastructure, and ObjectTracker is a pig</span>
|
25
|
+
1025: <span class="ruby-constant">ObjectTracker</span>.<span class="ruby-identifier">configure</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">what</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">:object</span>
|
26
|
+
1026: <span class="ruby-constant">MongrelDbg</span>.<span class="ruby-identifier">configure</span>
|
27
|
+
1027:
|
28
|
+
1028: <span class="ruby-comment cmt"># now we roll through each requested debug type, turn it on and load that plugin</span>
|
29
|
+
1029: <span class="ruby-identifier">what</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">type</span><span class="ruby-operator">|</span>
|
30
|
+
1030: <span class="ruby-constant">MongrelDbg</span>.<span class="ruby-identifier">begin_trace</span> <span class="ruby-identifier">type</span>
|
31
|
+
1031: <span class="ruby-identifier">uri</span> <span class="ruby-identifier">location</span>, <span class="ruby-identifier">:handler</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">plugin</span>(<span class="ruby-identifier">handlers</span>[<span class="ruby-identifier">type</span>])
|
32
|
+
1032: <span class="ruby-keyword kw">end</span>
|
33
|
+
1033: <span class="ruby-keyword kw">end</span></pre>
|
17
34
|
</body>
|
18
35
|
</html>
|
@@ -0,0 +1,18 @@
|
|
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>run_config (Mongrel::Configurator)</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.rb, line 1039</span>
|
14
|
+
1039: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run_config</span>(<span class="ruby-identifier">script</span>)
|
15
|
+
1040: <span class="ruby-identifier">open</span>(<span class="ruby-identifier">script</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">eval</span>(<span class="ruby-identifier">f</span>.<span class="ruby-identifier">read</span>, <span class="ruby-identifier">proc</span> {<span class="ruby-keyword kw">self</span>}) }
|
16
|
+
1041: <span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,33 @@
|
|
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>setup_signals (Mongrel::Configurator)</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.rb, line 1053</span>
|
14
|
+
1053: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup_signals</span>(<span class="ruby-identifier">options</span>={})
|
15
|
+
1054: <span class="ruby-identifier">ops</span> = <span class="ruby-identifier">resolve_defaults</span>(<span class="ruby-identifier">options</span>)
|
16
|
+
1055:
|
17
|
+
1056: <span class="ruby-comment cmt"># forced shutdown, even if previously restarted (actually just like TERM but for CTRL-C)</span>
|
18
|
+
1057: <span class="ruby-identifier">trap</span>(<span class="ruby-value str">"INT"</span>) { <span class="ruby-identifier">log</span> <span class="ruby-value str">"INT signal received."</span>; <span class="ruby-identifier">stop</span>(<span class="ruby-identifier">need_restart</span>=<span class="ruby-keyword kw">false</span>) }
|
19
|
+
1058:
|
20
|
+
1059: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/mswin/</span>
|
21
|
+
1060: <span class="ruby-comment cmt"># graceful shutdown</span>
|
22
|
+
1061: <span class="ruby-identifier">trap</span>(<span class="ruby-value str">"TERM"</span>) { <span class="ruby-identifier">log</span> <span class="ruby-value str">"TERM signal received."</span>; <span class="ruby-identifier">stop</span> }
|
23
|
+
1062:
|
24
|
+
1063: <span class="ruby-comment cmt"># restart</span>
|
25
|
+
1064: <span class="ruby-identifier">trap</span>(<span class="ruby-value str">"USR2"</span>) { <span class="ruby-identifier">log</span> <span class="ruby-value str">"USR2 signal received."</span>; <span class="ruby-identifier">stop</span>(<span class="ruby-identifier">need_restart</span>=<span class="ruby-keyword kw">true</span>) }
|
26
|
+
1065:
|
27
|
+
1066: <span class="ruby-identifier">log</span> <span class="ruby-value str">"Signals ready. TERM => stop. USR2 => restart. INT => stop (no restart)."</span>
|
28
|
+
1067: <span class="ruby-keyword kw">else</span>
|
29
|
+
1068: <span class="ruby-identifier">log</span> <span class="ruby-value str">"Signals ready. INT => stop (no restart)."</span>
|
30
|
+
1069: <span class="ruby-keyword kw">end</span>
|
31
|
+
1070: <span class="ruby-keyword kw">end</span></pre>
|
32
|
+
</body>
|
33
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
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>log (Mongrel::Configurator)</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.rb, line 1073</span>
|
14
|
+
1073: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log</span>(<span class="ruby-identifier">msg</span>)
|
15
|
+
1074: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">print</span> <span class="ruby-value str">"** "</span>, <span class="ruby-identifier">msg</span>, <span class="ruby-value str">"\n"</span>
|
16
|
+
1075: <span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -148,7 +148,7 @@ SCRIPT_NAME.
|
|
148
148
|
<tr class="top-aligned-row context-row">
|
149
149
|
<td class="context-item-name">MONGREL_VERSION</td>
|
150
150
|
<td>=</td>
|
151
|
-
<td class="context-item-value">"0.3.13.
|
151
|
+
<td class="context-item-value">"0.3.13.2".freeze</td>
|
152
152
|
</tr>
|
153
153
|
<tr class="top-aligned-row context-row">
|
154
154
|
<td class="context-item-name">MONGREL_TMP_BASE</td>
|
@@ -100,8 +100,8 @@ deflate everything even if the client can’t handle it.
|
|
100
100
|
<h3 class="section-bar">Methods</h3>
|
101
101
|
|
102
102
|
<div class="name-list">
|
103
|
-
<a href="#
|
104
|
-
<a href="#
|
103
|
+
<a href="#M000099">new</a>
|
104
|
+
<a href="#M000100">process</a>
|
105
105
|
</div>
|
106
106
|
</div>
|
107
107
|
|
@@ -136,12 +136,12 @@ deflate everything even if the client can’t handle it.
|
|
136
136
|
<div id="methods">
|
137
137
|
<h3 class="section-bar">Public Class methods</h3>
|
138
138
|
|
139
|
-
<div id="method-
|
140
|
-
<a name="
|
139
|
+
<div id="method-M000099" class="method-detail">
|
140
|
+
<a name="M000099"></a>
|
141
141
|
|
142
142
|
<div class="method-heading">
|
143
|
-
<a href="DeflateFilter.src/
|
144
|
-
onclick="popupCode('DeflateFilter.src/
|
143
|
+
<a href="DeflateFilter.src/M000099.html" target="Code" class="method-signature"
|
144
|
+
onclick="popupCode('DeflateFilter.src/M000099.html');return false;">
|
145
145
|
<span class="method-name">new</span><span class="method-args">(ops={})</span>
|
146
146
|
</a>
|
147
147
|
</div>
|
@@ -152,12 +152,12 @@ deflate everything even if the client can’t handle it.
|
|
152
152
|
|
153
153
|
<h3 class="section-bar">Public Instance methods</h3>
|
154
154
|
|
155
|
-
<div id="method-
|
156
|
-
<a name="
|
155
|
+
<div id="method-M000100" class="method-detail">
|
156
|
+
<a name="M000100"></a>
|
157
157
|
|
158
158
|
<div class="method-heading">
|
159
|
-
<a href="DeflateFilter.src/
|
160
|
-
onclick="popupCode('DeflateFilter.src/
|
159
|
+
<a href="DeflateFilter.src/M000100.html" target="Code" class="method-signature"
|
160
|
+
onclick="popupCode('DeflateFilter.src/M000100.html');return false;">
|
161
161
|
<span class="method-name">process</span><span class="method-args">(request, response)</span>
|
162
162
|
</a>
|
163
163
|
</div>
|
@@ -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/handlers.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 302</span>
|
14
|
+
302: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">ops</span>={})
|
15
|
+
303: <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">ops</span>
|
16
|
+
304: <span class="ruby-ivar">@always_deflate</span> = <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:always_deflate</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword kw">false</span>
|
17
|
+
305: <span class="ruby-keyword kw">end</span></pre>
|
18
18
|
</body>
|
19
19
|
</html>
|
@@ -10,19 +10,19 @@
|
|
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
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 307</span>
|
14
|
+
307: <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
|
+
308: <span class="ruby-identifier">accepts</span> = <span class="ruby-identifier">request</span>.<span class="ruby-identifier">params</span>[<span class="ruby-constant">HTTP_ACCEPT_ENCODING</span>]
|
16
|
+
309: <span class="ruby-comment cmt"># only process if they support compression</span>
|
17
|
+
310: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@always_deflate</span> <span class="ruby-keyword kw">or</span> (<span class="ruby-identifier">accepts</span> <span class="ruby-keyword kw">and</span> (<span class="ruby-identifier">accepts</span>.<span class="ruby-identifier">include?</span> <span class="ruby-value str">"deflate"</span> <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body_sent</span>))
|
18
|
+
311: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">header</span>[<span class="ruby-value str">"Content-Encoding"</span>] = <span class="ruby-value str">"deflate"</span>
|
19
|
+
312: <span class="ruby-comment cmt"># we can't just rewind the body and gzip it since the body could be an attached file</span>
|
20
|
+
313: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">rewind</span>
|
21
|
+
314: <span class="ruby-identifier">gzout</span> = <span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Zlib</span><span class="ruby-operator">::</span><span class="ruby-constant">Deflate</span>.<span class="ruby-identifier">deflate</span>(<span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">read</span>))
|
22
|
+
315: <span class="ruby-identifier">gzout</span>.<span class="ruby-identifier">rewind</span>
|
23
|
+
316: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">close</span>
|
24
|
+
317: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span> = <span class="ruby-identifier">gzout</span>
|
25
|
+
318: <span class="ruby-keyword kw">end</span>
|
26
|
+
319: <span class="ruby-keyword kw">end</span></pre>
|
27
27
|
</body>
|
28
28
|
</html>
|
@@ -108,12 +108,12 @@ DirHandler.default_content_type attribute.
|
|
108
108
|
<h3 class="section-bar">Methods</h3>
|
109
109
|
|
110
110
|
<div class="name-list">
|
111
|
-
<a href="#
|
112
|
-
<a href="#
|
113
|
-
<a href="#
|
114
|
-
<a href="#
|
115
|
-
<a href="#
|
116
|
-
<a href="#
|
111
|
+
<a href="#M000063">add_mime_type</a>
|
112
|
+
<a href="#M000059">can_serve</a>
|
113
|
+
<a href="#M000058">new</a>
|
114
|
+
<a href="#M000062">process</a>
|
115
|
+
<a href="#M000060">send_dir_listing</a>
|
116
|
+
<a href="#M000061">send_file</a>
|
117
117
|
</div>
|
118
118
|
</div>
|
119
119
|
|
@@ -176,12 +176,12 @@ DirHandler.default_content_type attribute.
|
|
176
176
|
<div id="methods">
|
177
177
|
<h3 class="section-bar">Public Class methods</h3>
|
178
178
|
|
179
|
-
<div id="method-
|
180
|
-
<a name="
|
179
|
+
<div id="method-M000063" class="method-detail">
|
180
|
+
<a name="M000063"></a>
|
181
181
|
|
182
182
|
<div class="method-heading">
|
183
|
-
<a href="DirHandler.src/
|
184
|
-
onclick="popupCode('DirHandler.src/
|
183
|
+
<a href="DirHandler.src/M000063.html" target="Code" class="method-signature"
|
184
|
+
onclick="popupCode('DirHandler.src/M000063.html');return false;">
|
185
185
|
<span class="method-name">add_mime_type</span><span class="method-args">(extension, type)</span>
|
186
186
|
</a>
|
187
187
|
</div>
|
@@ -194,12 +194,12 @@ you add any others you’ll need when serving content.
|
|
194
194
|
</div>
|
195
195
|
</div>
|
196
196
|
|
197
|
-
<div id="method-
|
198
|
-
<a name="
|
197
|
+
<div id="method-M000058" class="method-detail">
|
198
|
+
<a name="M000058"></a>
|
199
199
|
|
200
200
|
<div class="method-heading">
|
201
|
-
<a href="DirHandler.src/
|
202
|
-
onclick="popupCode('DirHandler.src/
|
201
|
+
<a href="DirHandler.src/M000058.html" target="Code" class="method-signature"
|
202
|
+
onclick="popupCode('DirHandler.src/M000058.html');return false;">
|
203
203
|
<span class="method-name">new</span><span class="method-args">(path, listing_allowed=true, index_html="index.html")</span>
|
204
204
|
</a>
|
205
205
|
</div>
|
@@ -213,12 +213,12 @@ You give it the path to the directory root and an (optional)
|
|
213
213
|
|
214
214
|
<h3 class="section-bar">Public Instance methods</h3>
|
215
215
|
|
216
|
-
<div id="method-
|
217
|
-
<a name="
|
216
|
+
<div id="method-M000059" class="method-detail">
|
217
|
+
<a name="M000059"></a>
|
218
218
|
|
219
219
|
<div class="method-heading">
|
220
|
-
<a href="DirHandler.src/
|
221
|
-
onclick="popupCode('DirHandler.src/
|
220
|
+
<a href="DirHandler.src/M000059.html" target="Code" class="method-signature"
|
221
|
+
onclick="popupCode('DirHandler.src/M000059.html');return false;">
|
222
222
|
<span class="method-name">can_serve</span><span class="method-args">(path_info)</span>
|
223
223
|
</a>
|
224
224
|
</div>
|
@@ -231,12 +231,12 @@ not).
|
|
231
231
|
</div>
|
232
232
|
</div>
|
233
233
|
|
234
|
-
<div id="method-
|
235
|
-
<a name="
|
234
|
+
<div id="method-M000062" class="method-detail">
|
235
|
+
<a name="M000062"></a>
|
236
236
|
|
237
237
|
<div class="method-heading">
|
238
|
-
<a href="DirHandler.src/
|
239
|
-
onclick="popupCode('DirHandler.src/
|
238
|
+
<a href="DirHandler.src/M000062.html" target="Code" class="method-signature"
|
239
|
+
onclick="popupCode('DirHandler.src/M000062.html');return false;">
|
240
240
|
<span class="method-name">process</span><span class="method-args">(request, response)</span>
|
241
241
|
</a>
|
242
242
|
</div>
|
@@ -249,12 +249,12 @@ allowed (based on the listing_allowed parameter to the constructor).
|
|
249
249
|
</div>
|
250
250
|
</div>
|
251
251
|
|
252
|
-
<div id="method-
|
253
|
-
<a name="
|
252
|
+
<div id="method-M000060" class="method-detail">
|
253
|
+
<a name="M000060"></a>
|
254
254
|
|
255
255
|
<div class="method-heading">
|
256
|
-
<a href="DirHandler.src/
|
257
|
-
onclick="popupCode('DirHandler.src/
|
256
|
+
<a href="DirHandler.src/M000060.html" target="Code" class="method-signature"
|
257
|
+
onclick="popupCode('DirHandler.src/M000060.html');return false;">
|
258
258
|
<span class="method-name">send_dir_listing</span><span class="method-args">(base, dir, response)</span>
|
259
259
|
</a>
|
260
260
|
</div>
|
@@ -264,18 +264,18 @@ allowed (based on the listing_allowed parameter to the constructor).
|
|
264
264
|
Returns a simplistic directory listing if they’re enabled, otherwise
|
265
265
|
a 403. Base is the base URI from the REQUEST_URI, dir is the directory to
|
266
266
|
serve on the file system (comes from <a
|
267
|
-
href="DirHandler.html#
|
267
|
+
href="DirHandler.html#M000059">can_serve</a>()), and response is the <a
|
268
268
|
href="HttpResponse.html">HttpResponse</a> object to send the results on.
|
269
269
|
</p>
|
270
270
|
</div>
|
271
271
|
</div>
|
272
272
|
|
273
|
-
<div id="method-
|
274
|
-
<a name="
|
273
|
+
<div id="method-M000061" class="method-detail">
|
274
|
+
<a name="M000061"></a>
|
275
275
|
|
276
276
|
<div class="method-heading">
|
277
|
-
<a href="DirHandler.src/
|
278
|
-
onclick="popupCode('DirHandler.src/
|
277
|
+
<a href="DirHandler.src/M000061.html" target="Code" class="method-signature"
|
278
|
+
onclick="popupCode('DirHandler.src/M000061.html');return false;">
|
279
279
|
<span class="method-name">send_file</span><span class="method-args">(req_path, request, response, header_only=false)</span>
|
280
280
|
</a>
|
281
281
|
</div>
|
@@ -5,39 +5,17 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>new (Mongrel::DirHandler)</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
|
-
140: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span> <span class="ruby-identifier">req_path</span>
|
21
|
-
141: <span class="ruby-comment cmt"># the request is for a directory</span>
|
22
|
-
142: <span class="ruby-identifier">index</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">req_path</span>, <span class="ruby-ivar">@index_html</span>)
|
23
|
-
143: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span> <span class="ruby-identifier">index</span>
|
24
|
-
144: <span class="ruby-comment cmt"># serve the index</span>
|
25
|
-
145: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">index</span>
|
26
|
-
146: <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@listing_allowed</span>
|
27
|
-
147: <span class="ruby-comment cmt"># serve the directory</span>
|
28
|
-
148: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">req_path</span>
|
29
|
-
149: <span class="ruby-keyword kw">else</span>
|
30
|
-
150: <span class="ruby-comment cmt"># do not serve anything</span>
|
31
|
-
151: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
32
|
-
152: <span class="ruby-keyword kw">end</span>
|
33
|
-
153: <span class="ruby-keyword kw">else</span>
|
34
|
-
154: <span class="ruby-comment cmt"># it's a file and it's there</span>
|
35
|
-
155: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">req_path</span>
|
36
|
-
156: <span class="ruby-keyword kw">end</span>
|
37
|
-
157: <span class="ruby-keyword kw">else</span>
|
38
|
-
158: <span class="ruby-comment cmt"># does not exist or isn't in the right spot</span>
|
39
|
-
159: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
40
|
-
160: <span class="ruby-keyword kw">end</span>
|
41
|
-
161: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 135</span>
|
14
|
+
135: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">listing_allowed</span>=<span class="ruby-keyword kw">true</span>, <span class="ruby-identifier">index_html</span>=<span class="ruby-value str">"index.html"</span>)
|
15
|
+
136: <span class="ruby-ivar">@path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">path</span>)
|
16
|
+
137: <span class="ruby-ivar">@listing_allowed</span>=<span class="ruby-identifier">listing_allowed</span>
|
17
|
+
138: <span class="ruby-ivar">@index_html</span> = <span class="ruby-identifier">index_html</span>
|
18
|
+
139: <span class="ruby-ivar">@default_content_type</span> = <span class="ruby-value str">"text/plain; charset=ISO-8859-1"</span>.<span class="ruby-identifier">freeze</span>
|
19
|
+
140: <span class="ruby-keyword kw">end</span></pre>
|
42
20
|
</body>
|
43
21
|
</html>
|