mongrel 0.3.13.4 → 1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +1 -75
- data/Rakefile +14 -14
- data/bin/mongrel_rails +35 -23
- data/doc/rdoc/classes/IO.html +12 -12
- data/doc/rdoc/classes/IO.src/{M000001.html → M000003.html} +0 -0
- data/doc/rdoc/classes/IO.src/{M000002.html → M000004.html} +0 -0
- data/doc/rdoc/classes/Kernel.html +11 -11
- data/doc/rdoc/classes/Kernel.src/{M000010.html → M000012.html} +0 -0
- data/doc/rdoc/classes/Kernel.src/{M000011.html → M000013.html} +0 -0
- data/doc/rdoc/classes/Mongrel.html +3 -3
- data/doc/rdoc/classes/Mongrel/CGIWrapper.html +77 -69
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000115.html +12 -19
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000116.html +34 -12
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000117.html +21 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000118.html +19 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000119.html +12 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000120.html +5 -6
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000121.html +18 -0
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000122.html +18 -0
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000123.html +19 -0
- data/doc/rdoc/classes/Mongrel/Camping.html +8 -8
- data/doc/rdoc/classes/Mongrel/Camping.src/M000041.html +22 -0
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.html +31 -12
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000042.html +20 -0
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000043.html +58 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.html +75 -73
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000018.html +11 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000019.html +29 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000020.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000021.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000022.html +5 -9
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000023.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000024.html +9 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000025.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000026.html +5 -11
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000027.html +5 -11
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000028.html +11 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000029.html +24 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000030.html +18 -0
- data/doc/rdoc/classes/Mongrel/Command/Registry.html +20 -20
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000031.html +7 -45
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/{M000030.html → M000032.html} +0 -0
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000033.html +58 -0
- data/doc/rdoc/classes/Mongrel/Configurator.html +163 -140
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000093.html +14 -8
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000094.html +18 -7
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000095.html +5 -10
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000096.html +8 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000097.html +7 -25
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000098.html +10 -6
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000099.html +5 -26
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000100.html +25 -20
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000101.html +6 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000102.html +26 -11
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000103.html +20 -6
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000104.html +5 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000105.html +11 -9
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000106.html +6 -9
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000107.html +5 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000108.html +9 -21
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000109.html +9 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000110.html +5 -23
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000111.html +21 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000112.html +18 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000113.html +36 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000114.html +18 -0
- data/doc/rdoc/classes/Mongrel/Const.html +8 -9
- data/doc/rdoc/classes/Mongrel/DeflateFilter.html +19 -12
- data/doc/rdoc/classes/Mongrel/DeflateFilter.src/{M000121.html → M000124.html} +5 -5
- data/doc/rdoc/classes/Mongrel/DeflateFilter.src/{M000122.html → M000125.html} +9 -14
- data/doc/rdoc/classes/Mongrel/DirHandler.html +43 -43
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000051.html +8 -25
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000052.html +29 -50
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000053.html +25 -26
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000054.html +52 -5
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000055.html +39 -0
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000056.html +18 -0
- data/doc/rdoc/classes/Mongrel/Error404Handler.html +11 -11
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000123.html → M000126.html} +4 -4
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000124.html → M000127.html} +4 -4
- data/doc/rdoc/classes/Mongrel/HeaderOut.html +15 -10
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000066.html +21 -0
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000067.html +21 -0
- data/doc/rdoc/classes/Mongrel/HttpHandler.html +25 -23
- data/doc/rdoc/classes/Mongrel/HttpHandler.src/M000072.html +4 -4
- data/doc/rdoc/classes/Mongrel/HttpHandler.src/{M000071.html → M000073.html} +3 -3
- data/doc/rdoc/classes/Mongrel/{HttpHandlerPlugin.src/M000012.html → HttpHandler.src/M000074.html} +4 -4
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.html +22 -21
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000014.html +4 -6
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000015.html +4 -4
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000016.html +19 -0
- data/doc/rdoc/classes/Mongrel/{HttpHandler.src/M000070.html → HttpHandlerPlugin.src/M000017.html} +4 -4
- data/doc/rdoc/classes/Mongrel/HttpParser.html +44 -42
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000044.html +6 -7
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000045.html +7 -37
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000046.html +7 -5
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000047.html +37 -5
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000048.html +5 -6
- data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000042.html → M000049.html} +5 -6
- data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000043.html → M000050.html} +6 -7
- data/doc/rdoc/classes/Mongrel/HttpRequest.html +37 -40
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000133.html +37 -7
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000134.html +28 -7
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000135.html +16 -19
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000136.html +20 -0
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000137.html +20 -0
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000138.html +32 -0
- data/doc/rdoc/classes/Mongrel/HttpResponse.html +95 -85
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000075.html +12 -13
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000076.html +7 -9
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000077.html +13 -9
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000078.html +9 -9
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000079.html +9 -18
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000080.html +9 -8
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000081.html +18 -7
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000082.html +8 -7
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000083.html +7 -7
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000084.html +7 -5
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000085.html +20 -0
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000086.html +18 -0
- data/doc/rdoc/classes/Mongrel/HttpServer.html +59 -63
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000057.html +12 -19
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000058.html +87 -8
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000059.html +19 -9
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000060.html +8 -49
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000061.html +16 -21
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000062.html +52 -5
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000063.html +21 -9
- data/doc/rdoc/classes/Mongrel/{HeaderOut.src → HttpServer.src}/M000064.html +5 -5
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000065.html +22 -0
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.html +27 -25
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000034.html +24 -13
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/{M000033.html → M000035.html} +11 -11
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000036.html +26 -0
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.html +24 -26
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000037.html +10 -8
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000038.html +43 -12
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000039.html +20 -0
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000040.html +25 -0
- data/doc/rdoc/classes/Mongrel/RedirectHandler.html +10 -10
- data/doc/rdoc/classes/Mongrel/RedirectHandler.src/{M000128.html → M000131.html} +8 -8
- data/doc/rdoc/classes/Mongrel/RedirectHandler.src/{M000129.html → M000132.html} +13 -13
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.html +20 -20
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000125.html → M000128.html} +10 -10
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000126.html → M000129.html} +10 -10
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000127.html → M000130.html} +4 -4
- data/doc/rdoc/classes/Mongrel/Stats.html +43 -42
- data/doc/rdoc/classes/Mongrel/Stats.src/M000139.html +6 -5
- data/doc/rdoc/classes/Mongrel/Stats.src/M000140.html +10 -5
- data/doc/rdoc/classes/Mongrel/Stats.src/M000141.html +13 -5
- data/doc/rdoc/classes/Mongrel/Stats.src/M000142.html +5 -10
- data/doc/rdoc/classes/Mongrel/Stats.src/M000143.html +5 -7
- data/doc/rdoc/classes/Mongrel/Stats.src/{M000136.html → M000144.html} +5 -6
- data/doc/rdoc/classes/Mongrel/Stats.src/M000145.html +23 -0
- data/doc/rdoc/classes/Mongrel/Stats.src/M000146.html +20 -0
- data/doc/rdoc/classes/Mongrel/StatusHandler.html +21 -21
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000068.html +5 -29
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000069.html +11 -7
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000070.html +42 -0
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000071.html +20 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.html +58 -55
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000087.html +5 -26
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000088.html +5 -38
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000089.html +18 -15
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000090.html +25 -57
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000091.html +36 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000092.html +83 -0
- data/doc/rdoc/classes/MongrelDbg.html +25 -25
- data/doc/rdoc/classes/MongrelDbg.src/M000007.html +11 -9
- data/doc/rdoc/classes/MongrelDbg.src/M000008.html +7 -8
- data/doc/rdoc/classes/MongrelDbg.src/M000009.html +9 -5
- data/doc/rdoc/classes/MongrelDbg.src/M000010.html +21 -0
- data/doc/rdoc/classes/MongrelDbg.src/M000011.html +18 -0
- data/doc/rdoc/classes/{Sync.html → Mutex.html} +50 -19
- data/doc/rdoc/classes/Mutex.src/M000001.html +24 -0
- data/doc/rdoc/classes/Mutex.src/M000002.html +32 -0
- data/doc/rdoc/classes/RequestLog/Access.html +5 -5
- data/doc/rdoc/classes/RequestLog/Access.src/{M000144.html → M000147.html} +0 -0
- data/doc/rdoc/classes/RequestLog/Files.html +5 -5
- data/doc/rdoc/classes/RequestLog/Files.src/{M000145.html → M000148.html} +0 -0
- data/doc/rdoc/classes/RequestLog/Objects.html +5 -5
- data/doc/rdoc/classes/RequestLog/Objects.src/{M000147.html → M000150.html} +0 -0
- data/doc/rdoc/classes/RequestLog/Params.html +5 -5
- data/doc/rdoc/classes/RequestLog/Params.src/{M000148.html → M000151.html} +0 -0
- data/doc/rdoc/classes/RequestLog/Threads.html +5 -5
- data/doc/rdoc/classes/RequestLog/Threads.src/{M000146.html → M000149.html} +0 -0
- data/doc/rdoc/classes/TCPServer.html +10 -10
- data/doc/rdoc/classes/TCPServer.src/{M000003.html → M000005.html} +0 -0
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/COPYING.html +1 -1
- data/doc/rdoc/files/LICENSE.html +1 -1
- data/doc/rdoc/files/README.html +11 -100
- 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/configurator_rb.html +1 -1
- data/doc/rdoc/files/lib/mongrel/debug_rb.html +2 -2
- data/doc/rdoc/files/lib/mongrel/handlers_rb.html +3 -2
- data/doc/rdoc/files/lib/mongrel/init_rb.html +2 -2
- data/doc/rdoc/files/lib/mongrel/rails_rb.html +2 -3
- 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 +5 -3
- data/doc/rdoc/files/lib/mutex_fix_rb.html +108 -0
- data/doc/rdoc/fr_class_index.html +1 -1
- data/doc/rdoc/fr_file_index.html +1 -0
- data/doc/rdoc/fr_method_index.html +151 -148
- data/ext/http11/http11.c +2 -2
- data/lib/mongrel.rb +85 -38
- data/lib/mongrel/camping.rb +17 -4
- data/lib/mongrel/configurator.rb +11 -7
- data/lib/mongrel/handlers.rb +30 -27
- data/lib/mongrel/mime_types.yml +615 -0
- data/lib/mongrel/rails.rb +21 -28
- data/lib/mutex_fix.rb +34 -0
- data/test/test_handlers.rb +16 -4
- data/test/test_http11.rb +8 -0
- data/test/test_request_progress.rb +45 -2
- data/test/test_response.rb +31 -0
- metadata +95 -71
- data/bin/mongrel_rails_service +0 -246
- data/bin/mongrel_rails_svc +0 -307
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000112.html +0 -25
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000113.html +0 -47
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000114.html +0 -34
- data/doc/rdoc/classes/Mongrel/Camping.src/M000039.html +0 -22
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000040.html +0 -18
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000041.html +0 -51
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000016.html +0 -24
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000017.html +0 -42
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000029.html +0 -20
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000091.html +0 -27
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000092.html +0 -31
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000049.html +0 -21
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000050.html +0 -43
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000065.html +0 -18
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000013.html +0 -17
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000130.html +0 -47
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000131.html +0 -37
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000132.html +0 -29
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000073.html +0 -25
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000074.html +0 -20
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000055.html +0 -25
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000056.html +0 -91
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000032.html +0 -37
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000035.html +0 -23
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000036.html +0 -54
- data/doc/rdoc/classes/Mongrel/Stats.src/M000137.html +0 -23
- data/doc/rdoc/classes/Mongrel/Stats.src/M000138.html +0 -26
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000066.html +0 -18
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000067.html +0 -24
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000085.html +0 -18
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000086.html +0 -18
- data/doc/rdoc/classes/MongrelDbg.src/M000005.html +0 -24
- data/doc/rdoc/classes/MongrelDbg.src/M000006.html +0 -20
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>redirect (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/configurator.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/configurator.rb, line 262</span>
|
14
|
+
262: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">redirect</span>(<span class="ruby-identifier">from</span>, <span class="ruby-identifier">pattern</span>, <span class="ruby-identifier">replacement</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
15
|
+
263: <span class="ruby-identifier">uri</span> <span class="ruby-identifier">from</span>, <span class="ruby-identifier">:handler</span> =<span class="ruby-operator">></span> <span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">RedirectHandler</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">pattern</span>, <span class="ruby-identifier">replacement</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
16
|
+
264: <span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -5,30 +5,18 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>run (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/configurator.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
315: <span class="ruby-identifier">:params</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"/handlers/requestlog::params"</span>
|
22
|
-
316: }
|
23
|
-
317:
|
24
|
-
318: <span class="ruby-comment cmt"># turn on the debugging infrastructure, and ObjectTracker is a pig</span>
|
25
|
-
319: <span class="ruby-constant">MongrelDbg</span>.<span class="ruby-identifier">configure</span>
|
26
|
-
320:
|
27
|
-
321: <span class="ruby-comment cmt"># now we roll through each requested debug type, turn it on and load that plugin</span>
|
28
|
-
322: <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>
|
29
|
-
323: <span class="ruby-constant">MongrelDbg</span>.<span class="ruby-identifier">begin_trace</span> <span class="ruby-identifier">type</span>
|
30
|
-
324: <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>])
|
31
|
-
325: <span class="ruby-keyword kw">end</span>
|
32
|
-
326: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/configurator.rb, line 269</span>
|
14
|
+
269: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>
|
15
|
+
270: <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
|
+
271: <span class="ruby-identifier">s</span>.<span class="ruby-identifier">run</span>
|
17
|
+
272: }
|
18
|
+
273:
|
19
|
+
274: <span class="ruby-identifier">$mongrel_sleeper_thread</span> = <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span> { <span class="ruby-identifier">loop</span> { <span class="ruby-identifier">sleep</span> <span class="ruby-value">1</span> } }
|
20
|
+
275: <span class="ruby-keyword kw">end</span></pre>
|
33
21
|
</body>
|
34
22
|
</html>
|
@@ -5,14 +5,18 @@
|
|
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> <span class="ruby-comment cmt"># File lib/mongrel/configurator.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/configurator.rb, line 280</span>
|
14
|
+
280: <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>)
|
15
|
+
281: <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
|
+
282: <span class="ruby-identifier">s</span>.<span class="ruby-identifier">stop</span>
|
17
|
+
283: }
|
18
|
+
284:
|
19
|
+
285: <span class="ruby-ivar">@needs_restart</span> = <span class="ruby-identifier">needs_restart</span>
|
20
|
+
286: <span class="ruby-keyword kw">end</span></pre>
|
17
21
|
</body>
|
18
22
|
</html>
|
@@ -5,32 +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> <span class="ruby-comment cmt"># File lib/mongrel/configurator.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
349: <span class="ruby-comment cmt"># forced shutdown, even if previously restarted (actually just like TERM but for CTRL-C)</span>
|
18
|
-
350: <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-keyword kw">false</span>) }
|
19
|
-
351:
|
20
|
-
352: <span class="ruby-comment cmt"># clean up the pid file always</span>
|
21
|
-
353: <span class="ruby-identifier">at_exit</span> { <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">exists?</span>(<span class="ruby-ivar">@pid_file</span>) }
|
22
|
-
354:
|
23
|
-
355: <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>
|
24
|
-
356: <span class="ruby-comment cmt"># graceful shutdown</span>
|
25
|
-
357: <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> }
|
26
|
-
358: <span class="ruby-identifier">trap</span>(<span class="ruby-value str">"USR1"</span>) { <span class="ruby-identifier">log</span> <span class="ruby-node">"USR1 received, toggling $mongrel_debug_client to #{!$mongrel_debug_client}"</span>; <span class="ruby-identifier">$mongrel_debug_client</span> = <span class="ruby-operator">!</span><span class="ruby-identifier">$mongrel_debug_client</span> }
|
27
|
-
359: <span class="ruby-comment cmt"># restart</span>
|
28
|
-
360: <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-keyword kw">true</span>) }
|
29
|
-
361:
|
30
|
-
362: <span class="ruby-identifier">log</span> <span class="ruby-value str">"Signals ready. TERM => stop. USR2 => restart. INT => stop (no restart)."</span>
|
31
|
-
363: <span class="ruby-keyword kw">else</span>
|
32
|
-
364: <span class="ruby-identifier">log</span> <span class="ruby-value str">"Signals ready. INT => stop (no restart)."</span>
|
33
|
-
365: <span class="ruby-keyword kw">end</span>
|
34
|
-
366: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/configurator.rb, line 292</span>
|
14
|
+
292: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">join</span>
|
15
|
+
293: <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
|
+
294: <span class="ruby-keyword kw">end</span></pre>
|
35
17
|
</body>
|
36
18
|
</html>
|
@@ -5,14 +5,30 @@
|
|
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/configurator.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/configurator.rb, line 312</span>
|
14
|
+
312: <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">:access</span>, <span class="ruby-identifier">:files</span>, <span class="ruby-identifier">:objects</span>, <span class="ruby-identifier">:threads</span>, <span class="ruby-identifier">:rails</span>])
|
15
|
+
313: <span class="ruby-identifier">require</span> <span class="ruby-value str">'mongrel/debug'</span>
|
16
|
+
314: <span class="ruby-identifier">handlers</span> = {
|
17
|
+
315: <span class="ruby-identifier">:access</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"/handlers/requestlog::access"</span>,
|
18
|
+
316: <span class="ruby-identifier">:files</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"/handlers/requestlog::files"</span>,
|
19
|
+
317: <span class="ruby-identifier">:objects</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"/handlers/requestlog::objects"</span>,
|
20
|
+
318: <span class="ruby-identifier">:threads</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"/handlers/requestlog::threads"</span>,
|
21
|
+
319: <span class="ruby-identifier">:rails</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"/handlers/requestlog::params"</span>
|
22
|
+
320: }
|
23
|
+
321:
|
24
|
+
322: <span class="ruby-comment cmt"># turn on the debugging infrastructure, and ObjectTracker is a pig</span>
|
25
|
+
323: <span class="ruby-constant">MongrelDbg</span>.<span class="ruby-identifier">configure</span>
|
26
|
+
324:
|
27
|
+
325: <span class="ruby-comment cmt"># now we roll through each requested debug type, turn it on and load that plugin</span>
|
28
|
+
326: <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>
|
29
|
+
327: <span class="ruby-constant">MongrelDbg</span>.<span class="ruby-identifier">begin_trace</span> <span class="ruby-identifier">type</span>
|
30
|
+
328: <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>])
|
31
|
+
329: <span class="ruby-keyword kw">end</span>
|
32
|
+
330: <span class="ruby-keyword kw">end</span></pre>
|
17
33
|
</body>
|
18
34
|
</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/configurator.rb, line 336</span>
|
14
|
+
336: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run_config</span>(<span class="ruby-identifier">script</span>)
|
15
|
+
337: <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
|
+
338: <span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,36 @@
|
|
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/configurator.rb, line 350</span>
|
14
|
+
350: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup_signals</span>(<span class="ruby-identifier">options</span>={})
|
15
|
+
351: <span class="ruby-identifier">ops</span> = <span class="ruby-identifier">resolve_defaults</span>(<span class="ruby-identifier">options</span>)
|
16
|
+
352:
|
17
|
+
353: <span class="ruby-comment cmt"># forced shutdown, even if previously restarted (actually just like TERM but for CTRL-C)</span>
|
18
|
+
354: <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-keyword kw">false</span>) }
|
19
|
+
355:
|
20
|
+
356: <span class="ruby-comment cmt"># clean up the pid file always</span>
|
21
|
+
357: <span class="ruby-identifier">at_exit</span> { <span class="ruby-identifier">remove_pid_file</span> }
|
22
|
+
358:
|
23
|
+
359: <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>
|
24
|
+
360: <span class="ruby-comment cmt"># graceful shutdown</span>
|
25
|
+
361: <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> }
|
26
|
+
362: <span class="ruby-identifier">trap</span>(<span class="ruby-value str">"USR1"</span>) { <span class="ruby-identifier">log</span> <span class="ruby-node">"USR1 received, toggling $mongrel_debug_client to #{!$mongrel_debug_client}"</span>; <span class="ruby-identifier">$mongrel_debug_client</span> = <span class="ruby-operator">!</span><span class="ruby-identifier">$mongrel_debug_client</span> }
|
27
|
+
363: <span class="ruby-comment cmt"># restart</span>
|
28
|
+
364: <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-keyword kw">true</span>) }
|
29
|
+
365:
|
30
|
+
366: <span class="ruby-identifier">log</span> <span class="ruby-value str">"Signals ready. TERM => stop. USR2 => restart. INT => stop (no restart)."</span>
|
31
|
+
367: <span class="ruby-keyword kw">else</span>
|
32
|
+
368: <span class="ruby-identifier">log</span> <span class="ruby-value str">"Signals ready. INT => stop (no restart)."</span>
|
33
|
+
369: <span class="ruby-keyword kw">end</span>
|
34
|
+
370: <span class="ruby-keyword kw">end</span></pre>
|
35
|
+
</body>
|
36
|
+
</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/configurator.rb, line 373</span>
|
14
|
+
373: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log</span>(<span class="ruby-identifier">msg</span>)
|
15
|
+
374: <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
|
+
375: <span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -153,18 +153,12 @@ SCRIPT_NAME.
|
|
153
153
|
<tr class="top-aligned-row context-row">
|
154
154
|
<td class="context-item-name">MONGREL_VERSION</td>
|
155
155
|
<td>=</td>
|
156
|
-
<td class="context-item-value">"0
|
156
|
+
<td class="context-item-value">"1.0".freeze</td>
|
157
157
|
</tr>
|
158
158
|
<tr class="top-aligned-row context-row">
|
159
159
|
<td class="context-item-name">MONGREL_TMP_BASE</td>
|
160
160
|
<td>=</td>
|
161
161
|
<td class="context-item-value">"mongrel".freeze</td>
|
162
|
-
<td width="3em"> </td>
|
163
|
-
<td class="context-item-desc">
|
164
|
-
TODO: this use of a base for tempfiles needs to be looked at for security
|
165
|
-
problems
|
166
|
-
|
167
|
-
</td>
|
168
162
|
</tr>
|
169
163
|
<tr class="top-aligned-row context-row">
|
170
164
|
<td class="context-item-name">ERROR_404_RESPONSE</td>
|
@@ -198,7 +192,7 @@ A common header for indicating the server is too busy. Not used yet.
|
|
198
192
|
<td class="context-item-value">(16 * 1024)</td>
|
199
193
|
<td width="3em"> </td>
|
200
194
|
<td class="context-item-desc">
|
201
|
-
The basic max request size we&#
|
195
|
+
The basic max request size we‘ll try to read.
|
202
196
|
|
203
197
|
</td>
|
204
198
|
</tr>
|
@@ -209,7 +203,7 @@ The basic max request size we’ll try to read.
|
|
209
203
|
<td width="3em"> </td>
|
210
204
|
<td class="context-item-desc">
|
211
205
|
This is the maximum header that is allowed before a client is booted. The
|
212
|
-
parser detects this, but we&#
|
206
|
+
parser detects this, but we‘d also like to do this as well.
|
213
207
|
|
214
208
|
</td>
|
215
209
|
</tr>
|
@@ -315,6 +309,11 @@ win32)
|
|
315
309
|
<td>=</td>
|
316
310
|
<td class="context-item-value">"HTTP/1.1 302 Found\r\nLocation: %s\r\nConnection: close\r\n\r\n".freeze</td>
|
317
311
|
</tr>
|
312
|
+
<tr class="top-aligned-row context-row">
|
313
|
+
<td class="context-item-name">HOST</td>
|
314
|
+
<td>=</td>
|
315
|
+
<td class="context-item-value">"HOST".freeze</td>
|
316
|
+
</tr>
|
318
317
|
</table>
|
319
318
|
</div>
|
320
319
|
</div>
|
@@ -83,12 +83,12 @@
|
|
83
83
|
<div id="description">
|
84
84
|
<p>
|
85
85
|
When added to a config script (-S in mongrel_rails) it will look at the
|
86
|
-
client&#
|
86
|
+
client‘s allowed response types and then gzip compress anything that
|
87
87
|
is going out.
|
88
88
|
</p>
|
89
89
|
<p>
|
90
90
|
Valid option is :always_deflate => false which tells the handler to
|
91
|
-
deflate everything even if the client can&#
|
91
|
+
deflate everything even if the client can‘t handle it.
|
92
92
|
</p>
|
93
93
|
|
94
94
|
</div>
|
@@ -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="#M000124">new</a>
|
104
|
+
<a href="#M000125">process</a>
|
105
105
|
</div>
|
106
106
|
</div>
|
107
107
|
|
@@ -109,6 +109,13 @@ deflate everything even if the client can’t handle it.
|
|
109
109
|
|
110
110
|
|
111
111
|
<!-- if includes -->
|
112
|
+
<div id="includes">
|
113
|
+
<h3 class="section-bar">Included Modules</h3>
|
114
|
+
|
115
|
+
<div id="includes-list">
|
116
|
+
<span class="include-name">Zlib</span>
|
117
|
+
</div>
|
118
|
+
</div>
|
112
119
|
|
113
120
|
<div id="section">
|
114
121
|
|
@@ -136,12 +143,12 @@ deflate everything even if the client can’t handle it.
|
|
136
143
|
<div id="methods">
|
137
144
|
<h3 class="section-bar">Public Class methods</h3>
|
138
145
|
|
139
|
-
<div id="method-
|
140
|
-
<a name="
|
146
|
+
<div id="method-M000124" class="method-detail">
|
147
|
+
<a name="M000124"></a>
|
141
148
|
|
142
149
|
<div class="method-heading">
|
143
|
-
<a href="DeflateFilter.src/
|
144
|
-
onclick="popupCode('DeflateFilter.src/
|
150
|
+
<a href="DeflateFilter.src/M000124.html" target="Code" class="method-signature"
|
151
|
+
onclick="popupCode('DeflateFilter.src/M000124.html');return false;">
|
145
152
|
<span class="method-name">new</span><span class="method-args">(ops={})</span>
|
146
153
|
</a>
|
147
154
|
</div>
|
@@ -152,12 +159,12 @@ deflate everything even if the client can’t handle it.
|
|
152
159
|
|
153
160
|
<h3 class="section-bar">Public Instance methods</h3>
|
154
161
|
|
155
|
-
<div id="method-
|
156
|
-
<a name="
|
162
|
+
<div id="method-M000125" class="method-detail">
|
163
|
+
<a name="M000125"></a>
|
157
164
|
|
158
165
|
<div class="method-heading">
|
159
|
-
<a href="DeflateFilter.src/
|
160
|
-
onclick="popupCode('DeflateFilter.src/
|
166
|
+
<a href="DeflateFilter.src/M000125.html" target="Code" class="method-signature"
|
167
|
+
onclick="popupCode('DeflateFilter.src/M000125.html');return false;">
|
161
168
|
<span class="method-name">process</span><span class="method-args">(request, response)</span>
|
162
169
|
</a>
|
163
170
|
</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 279</span>
|
14
|
+
279: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">ops</span>={})
|
15
|
+
280: <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">ops</span>
|
16
|
+
281: <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
|
+
282: <span class="ruby-keyword kw">end</span></pre>
|
18
18
|
</body>
|
19
19
|
</html>
|
@@ -10,19 +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/handlers.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
300: <span class="ruby-identifier">gzout</span>.<span class="ruby-identifier">rewind</span>
|
23
|
-
301: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">close</span>
|
24
|
-
302: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span> = <span class="ruby-identifier">gzout</span>
|
25
|
-
303: <span class="ruby-keyword kw">end</span>
|
26
|
-
304: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 284</span>
|
14
|
+
284: <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
|
+
285: <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
|
+
286: <span class="ruby-comment cmt"># only process if they support compression</span>
|
17
|
+
287: <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
|
+
288: <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
|
+
289: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span> = <span class="ruby-identifier">deflate</span>(<span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>)
|
20
|
+
290: <span class="ruby-keyword kw">end</span>
|
21
|
+
291: <span class="ruby-keyword kw">end</span></pre>
|
27
22
|
</body>
|
28
23
|
</html>
|
@@ -88,9 +88,9 @@ PATH_INFO inside the directory. If the requested path is a directory then
|
|
88
88
|
it returns a simple directory listing.
|
89
89
|
</p>
|
90
90
|
<p>
|
91
|
-
It does a simple protection against going outside it&#
|
91
|
+
It does a simple protection against going outside it‘s root path by
|
92
92
|
converting all paths to an absolute expanded path, and then making sure
|
93
|
-
that the final expanded path includes the root path. If it doesn&#
|
93
|
+
that the final expanded path includes the root path. If it doesn‘t
|
94
94
|
than it simply gives a 404.
|
95
95
|
</p>
|
96
96
|
<p>
|
@@ -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="#M000056">add_mime_type</a>
|
112
|
+
<a href="#M000052">can_serve</a>
|
113
|
+
<a href="#M000051">new</a>
|
114
|
+
<a href="#M000055">process</a>
|
115
|
+
<a href="#M000053">send_dir_listing</a>
|
116
|
+
<a href="#M000054">send_file</a>
|
117
117
|
</div>
|
118
118
|
</div>
|
119
119
|
|
@@ -130,10 +130,15 @@ DirHandler.default_content_type attribute.
|
|
130
130
|
|
131
131
|
<div class="name-list">
|
132
132
|
<table summary="Constants">
|
133
|
+
<tr class="top-aligned-row context-row">
|
134
|
+
<td class="context-item-name">MIME_TYPES_FILE</td>
|
135
|
+
<td>=</td>
|
136
|
+
<td class="context-item-value">"mime_types.yml"</td>
|
137
|
+
</tr>
|
133
138
|
<tr class="top-aligned-row context-row">
|
134
139
|
<td class="context-item-name">MIME_TYPES</td>
|
135
140
|
<td>=</td>
|
136
|
-
<td class="context-item-value">
|
141
|
+
<td class="context-item-value">YAML.load_file(File.join(File.dirname(__FILE__), MIME_TYPES_FILE))</td>
|
137
142
|
</tr>
|
138
143
|
<tr class="top-aligned-row context-row">
|
139
144
|
<td class="context-item-name">ONLY_HEAD_GET</td>
|
@@ -153,12 +158,7 @@ DirHandler.default_content_type attribute.
|
|
153
158
|
<table>
|
154
159
|
<tr class="top-aligned-row context-row">
|
155
160
|
<td class="context-item-name">default_content_type</td>
|
156
|
-
<td class="context-item-value"> [
|
157
|
-
<td class="context-item-desc"></td>
|
158
|
-
</tr>
|
159
|
-
<tr class="top-aligned-row context-row">
|
160
|
-
<td class="context-item-name">default_content_type</td>
|
161
|
-
<td class="context-item-value"> [W] </td>
|
161
|
+
<td class="context-item-value"> [RW] </td>
|
162
162
|
<td class="context-item-desc"></td>
|
163
163
|
</tr>
|
164
164
|
<tr class="top-aligned-row context-row">
|
@@ -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-M000056" class="method-detail">
|
180
|
+
<a name="M000056"></a>
|
181
181
|
|
182
182
|
<div class="method-heading">
|
183
|
-
<a href="DirHandler.src/
|
184
|
-
onclick="popupCode('DirHandler.src/
|
183
|
+
<a href="DirHandler.src/M000056.html" target="Code" class="method-signature"
|
184
|
+
onclick="popupCode('DirHandler.src/M000056.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>
|
@@ -189,17 +189,17 @@ DirHandler.default_content_type attribute.
|
|
189
189
|
<div class="method-description">
|
190
190
|
<p>
|
191
191
|
There is a small number of default mime types for extensions, but this lets
|
192
|
-
you add any others you&#
|
192
|
+
you add any others you‘ll need when serving content.
|
193
193
|
</p>
|
194
194
|
</div>
|
195
195
|
</div>
|
196
196
|
|
197
|
-
<div id="method-
|
198
|
-
<a name="
|
197
|
+
<div id="method-M000051" class="method-detail">
|
198
|
+
<a name="M000051"></a>
|
199
199
|
|
200
200
|
<div class="method-heading">
|
201
|
-
<a href="DirHandler.src/
|
202
|
-
onclick="popupCode('DirHandler.src/
|
201
|
+
<a href="DirHandler.src/M000051.html" target="Code" class="method-signature"
|
202
|
+
onclick="popupCode('DirHandler.src/M000051.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-M000052" class="method-detail">
|
217
|
+
<a name="M000052"></a>
|
218
218
|
|
219
219
|
<div class="method-heading">
|
220
|
-
<a href="DirHandler.src/
|
221
|
-
onclick="popupCode('DirHandler.src/
|
220
|
+
<a href="DirHandler.src/M000052.html" target="Code" class="method-signature"
|
221
|
+
onclick="popupCode('DirHandler.src/M000052.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-M000055" class="method-detail">
|
235
|
+
<a name="M000055"></a>
|
236
236
|
|
237
237
|
<div class="method-heading">
|
238
|
-
<a href="DirHandler.src/
|
239
|
-
onclick="popupCode('DirHandler.src/
|
238
|
+
<a href="DirHandler.src/M000055.html" target="Code" class="method-signature"
|
239
|
+
onclick="popupCode('DirHandler.src/M000055.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,33 +249,33 @@ 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-M000053" class="method-detail">
|
253
|
+
<a name="M000053"></a>
|
254
254
|
|
255
255
|
<div class="method-heading">
|
256
|
-
<a href="DirHandler.src/
|
257
|
-
onclick="popupCode('DirHandler.src/
|
256
|
+
<a href="DirHandler.src/M000053.html" target="Code" class="method-signature"
|
257
|
+
onclick="popupCode('DirHandler.src/M000053.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>
|
261
261
|
|
262
262
|
<div class="method-description">
|
263
263
|
<p>
|
264
|
-
Returns a simplistic directory listing if they&#
|
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#M000052">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-M000054" class="method-detail">
|
274
|
+
<a name="M000054"></a>
|
275
275
|
|
276
276
|
<div class="method-heading">
|
277
|
-
<a href="DirHandler.src/
|
278
|
-
onclick="popupCode('DirHandler.src/
|
277
|
+
<a href="DirHandler.src/M000054.html" target="Code" class="method-signature"
|
278
|
+
onclick="popupCode('DirHandler.src/M000054.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>
|
@@ -283,7 +283,7 @@ href="HttpResponse.html">HttpResponse</a> object to send the results on.
|
|
283
283
|
<div class="method-description">
|
284
284
|
<p>
|
285
285
|
Sends the contents of a file back to the user. Not terribly efficient since
|
286
|
-
it&#
|
286
|
+
it‘s opening and closing the file for each read.
|
287
287
|
</p>
|
288
288
|
</div>
|
289
289
|
</div>
|