mongrel 0.3.13 → 0.3.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. data/Rakefile +1 -1
  2. data/bin/mongrel_rails +1 -1
  3. data/doc/rdoc/classes/Mongrel.html +1 -0
  4. data/doc/rdoc/classes/Mongrel/CGIWrapper.html +49 -49
  5. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000098.html +11 -21
  6. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000099.html +34 -14
  7. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000100.html +21 -12
  8. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000101.html +14 -5
  9. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000102.html +12 -5
  10. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000103.html +5 -5
  11. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000104.html +5 -6
  12. data/doc/rdoc/classes/Mongrel/{URIClassifier.src/M000088.html → CGIWrapper.src/M000105.html} +5 -5
  13. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000106.html +19 -0
  14. data/doc/rdoc/classes/Mongrel/Camping.html +5 -5
  15. data/doc/rdoc/classes/Mongrel/Camping.src/{M000046.html → M000047.html} +0 -0
  16. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.html +10 -10
  17. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000048.html +5 -38
  18. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000049.html +51 -0
  19. data/doc/rdoc/classes/Mongrel/Command/Base.html +65 -65
  20. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000025.html +11 -29
  21. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000026.html +29 -5
  22. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000027.html +5 -5
  23. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000028.html +5 -5
  24. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000029.html +5 -5
  25. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000030.html +5 -9
  26. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000031.html +9 -5
  27. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000032.html +5 -5
  28. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000033.html +5 -5
  29. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000034.html +5 -11
  30. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000035.html +11 -11
  31. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000036.html +11 -5
  32. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000037.html +18 -0
  33. data/doc/rdoc/classes/Mongrel/Command/Registry.html +15 -15
  34. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000038.html +7 -12
  35. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000039.html +12 -37
  36. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000040.html +50 -0
  37. data/doc/rdoc/classes/Mongrel/Configurator.html +143 -107
  38. data/doc/rdoc/classes/Mongrel/Configurator.src/M000107.html +16 -7
  39. data/doc/rdoc/classes/Mongrel/Configurator.src/M000108.html +18 -7
  40. data/doc/rdoc/classes/Mongrel/Configurator.src/M000109.html +7 -10
  41. data/doc/rdoc/classes/Mongrel/Configurator.src/M000110.html +7 -5
  42. data/doc/rdoc/classes/Mongrel/Configurator.src/M000111.html +10 -21
  43. data/doc/rdoc/classes/Mongrel/Configurator.src/M000112.html +5 -6
  44. data/doc/rdoc/classes/Mongrel/Configurator.src/M000113.html +21 -17
  45. data/doc/rdoc/classes/Mongrel/Configurator.src/M000114.html +6 -20
  46. data/doc/rdoc/classes/Mongrel/Configurator.src/M000115.html +17 -5
  47. data/doc/rdoc/classes/Mongrel/Configurator.src/M000116.html +20 -11
  48. data/doc/rdoc/classes/Mongrel/Configurator.src/M000117.html +5 -6
  49. data/doc/rdoc/classes/Mongrel/Configurator.src/M000118.html +11 -9
  50. data/doc/rdoc/classes/Mongrel/Configurator.src/M000119.html +6 -12
  51. data/doc/rdoc/classes/Mongrel/Configurator.src/M000120.html +5 -5
  52. data/doc/rdoc/classes/Mongrel/Configurator.src/M000121.html +9 -22
  53. data/doc/rdoc/classes/Mongrel/Configurator.src/M000122.html +12 -5
  54. data/doc/rdoc/classes/Mongrel/Configurator.src/M000123.html +5 -20
  55. data/doc/rdoc/classes/Mongrel/Configurator.src/M000124.html +22 -5
  56. data/doc/rdoc/classes/Mongrel/Configurator.src/M000125.html +18 -0
  57. data/doc/rdoc/classes/Mongrel/Configurator.src/M000126.html +33 -0
  58. data/doc/rdoc/classes/Mongrel/Configurator.src/M000127.html +18 -0
  59. data/doc/rdoc/classes/Mongrel/Const.html +6 -1
  60. data/doc/rdoc/classes/Mongrel/DeflateFilter.html +10 -10
  61. data/doc/rdoc/classes/Mongrel/DeflateFilter.src/{M000094.html → M000096.html} +5 -5
  62. data/doc/rdoc/classes/Mongrel/DeflateFilter.src/{M000095.html → M000097.html} +14 -14
  63. data/doc/rdoc/classes/Mongrel/DirHandler.html +31 -31
  64. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000057.html +8 -30
  65. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000058.html +30 -29
  66. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000059.html +29 -50
  67. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000060.html +50 -26
  68. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000061.html +26 -5
  69. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000062.html +18 -0
  70. data/doc/rdoc/classes/Mongrel/Error404Handler.html +10 -10
  71. data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000125.html → M000128.html} +4 -4
  72. data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000126.html → M000129.html} +4 -4
  73. data/doc/rdoc/classes/Mongrel/HeaderOut.html +10 -10
  74. data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000070.html +5 -5
  75. data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000071.html +18 -0
  76. data/doc/rdoc/classes/Mongrel/HttpHandler.html +31 -9
  77. data/doc/rdoc/classes/Mongrel/{URIClassifier.src/M000089.html → HttpHandler.src/M000076.html} +4 -5
  78. data/doc/rdoc/classes/Mongrel/HttpHandler.src/{M000075.html → M000077.html} +3 -3
  79. data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.html +30 -15
  80. data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000022.html +4 -6
  81. data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000023.html +6 -4
  82. data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000024.html +17 -0
  83. data/doc/rdoc/classes/Mongrel/HttpParser.html +35 -35
  84. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000050.html +5 -6
  85. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000051.html +7 -7
  86. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000052.html +7 -37
  87. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000053.html +37 -5
  88. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000054.html +5 -5
  89. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000055.html +5 -6
  90. data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000049.html → M000056.html} +6 -6
  91. data/doc/rdoc/classes/Mongrel/HttpRequest.html +20 -20
  92. data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000130.html → M000135.html} +38 -38
  93. data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000131.html → M000136.html} +6 -6
  94. data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000132.html → M000137.html} +6 -6
  95. data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000133.html → M000138.html} +18 -18
  96. data/doc/rdoc/classes/Mongrel/HttpResponse.html +61 -61
  97. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000078.html +12 -12
  98. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000079.html +7 -9
  99. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000080.html +12 -9
  100. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000081.html +9 -9
  101. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000082.html +9 -18
  102. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000083.html +9 -8
  103. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000084.html +18 -7
  104. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000085.html +8 -7
  105. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000086.html +7 -7
  106. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000087.html +7 -5
  107. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000088.html +20 -0
  108. data/doc/rdoc/classes/Mongrel/{HeaderOut.src/M000069.html → HttpResponse.src/M000089.html} +5 -5
  109. data/doc/rdoc/classes/Mongrel/HttpServer.html +38 -38
  110. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000063.html +12 -70
  111. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000064.html +76 -13
  112. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000065.html +13 -50
  113. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000066.html +50 -21
  114. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000067.html +20 -4
  115. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000068.html +5 -9
  116. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000069.html +22 -0
  117. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.html +15 -15
  118. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000041.html +26 -12
  119. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000042.html +12 -13
  120. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000043.html +26 -0
  121. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.html +15 -15
  122. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000044.html +9 -38
  123. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000045.html +38 -10
  124. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000046.html +23 -0
  125. data/doc/rdoc/classes/Mongrel/RedirectHandler.html +187 -0
  126. data/doc/rdoc/classes/Mongrel/RedirectHandler.src/M000133.html +22 -0
  127. data/doc/rdoc/classes/Mongrel/RedirectHandler.src/M000134.html +27 -0
  128. data/doc/rdoc/classes/Mongrel/StatisticsFilter.html +16 -16
  129. data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000127.html → M000130.html} +10 -10
  130. data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000128.html → M000131.html} +10 -10
  131. data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000129.html → M000132.html} +4 -4
  132. data/doc/rdoc/classes/Mongrel/StatusHandler.html +20 -20
  133. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000072.html +5 -11
  134. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000073.html +11 -29
  135. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000074.html +29 -7
  136. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000075.html +20 -0
  137. data/doc/rdoc/classes/Mongrel/URIClassifier.html +30 -30
  138. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000090.html +5 -26
  139. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000091.html +5 -38
  140. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000092.html +18 -15
  141. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000093.html +25 -57
  142. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000094.html +36 -0
  143. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000095.html +83 -0
  144. data/doc/rdoc/classes/RequestLog/Access.html +5 -5
  145. data/doc/rdoc/classes/RequestLog/Access.src/{M000134.html → M000139.html} +0 -0
  146. data/doc/rdoc/classes/RequestLog/Files.html +5 -5
  147. data/doc/rdoc/classes/RequestLog/Files.src/{M000135.html → M000140.html} +0 -0
  148. data/doc/rdoc/classes/RequestLog/Objects.html +5 -5
  149. data/doc/rdoc/classes/RequestLog/Objects.src/{M000137.html → M000142.html} +0 -0
  150. data/doc/rdoc/classes/RequestLog/Params.html +5 -5
  151. data/doc/rdoc/classes/RequestLog/Params.src/{M000138.html → M000143.html} +0 -0
  152. data/doc/rdoc/classes/RequestLog/Threads.html +5 -5
  153. data/doc/rdoc/classes/RequestLog/Threads.src/{M000136.html → M000141.html} +0 -0
  154. data/doc/rdoc/created.rid +1 -1
  155. data/doc/rdoc/files/ext/http11/http11_c.html +1 -1
  156. data/doc/rdoc/files/lib/mongrel/handlers_rb.html +1 -1
  157. data/doc/rdoc/files/lib/mongrel_rb.html +1 -1
  158. data/doc/rdoc/fr_class_index.html +1 -0
  159. data/doc/rdoc/fr_method_index.html +124 -119
  160. data/examples/simpletest.rb +2 -0
  161. data/ext/http11/http11.c +1 -1
  162. data/lib/mongrel.rb +30 -5
  163. data/lib/mongrel/handlers.rb +57 -2
  164. data/test/test_redirect_handler.rb +40 -0
  165. metadata +47 -38
  166. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000096.html +0 -24
  167. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000097.html +0 -47
  168. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000047.html +0 -18
  169. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000024.html +0 -24
  170. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000037.html +0 -20
  171. data/doc/rdoc/classes/Mongrel/Configurator.src/M000105.html +0 -29
  172. data/doc/rdoc/classes/Mongrel/Configurator.src/M000106.html +0 -31
  173. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000056.html +0 -21
  174. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000076.html +0 -25
  175. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000077.html +0 -20
  176. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000062.html +0 -25
  177. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000040.html +0 -39
  178. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000043.html +0 -22
  179. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000071.html +0 -18
@@ -5,14 +5,21 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>run_config (Mongrel::Configurator)</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.rb, line 997</span>
14
- 997: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run_config</span>(<span class="ruby-identifier">script</span>)
15
- 998: <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
- 999: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 962</span>
14
+ 962: <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
+ 963: <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
+ 964: <span class="ruby-identifier">s</span>.<span class="ruby-identifier">stop</span>
17
+ 965: }
18
+ 966:
19
+ 967: <span class="ruby-ivar">@needs_restart</span> = <span class="ruby-identifier">needs_restart</span>
20
+ 968: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">unlink_pid_file</span>
21
+ 969: <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
+ 970: <span class="ruby-keyword kw">end</span>
23
+ 971: <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>setup_signals (Mongrel::Configurator)</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.rb, line 1011</span>
14
- 1011: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup_signals</span>(<span class="ruby-identifier">options</span>={})
15
- 1012: <span class="ruby-identifier">ops</span> = <span class="ruby-identifier">resolve_defaults</span>(<span class="ruby-identifier">options</span>)
16
- 1013:
17
- 1014: <span class="ruby-comment cmt"># forced shutdown, even if previously restarted (actually just like TERM but for CTRL-C)</span>
18
- 1015: <span class="ruby-identifier">trap</span>(<span class="ruby-value str">&quot;INT&quot;</span>) { <span class="ruby-identifier">log</span> <span class="ruby-value str">&quot;INT signal received.&quot;</span>; <span class="ruby-identifier">stop</span>(<span class="ruby-identifier">need_restart</span>=<span class="ruby-keyword kw">false</span>) }
19
- 1016:
20
- 1017: <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
- 1018: <span class="ruby-comment cmt"># graceful shutdown</span>
22
- 1019: <span class="ruby-identifier">trap</span>(<span class="ruby-value str">&quot;TERM&quot;</span>) { <span class="ruby-identifier">log</span> <span class="ruby-value str">&quot;TERM signal received.&quot;</span>; <span class="ruby-identifier">stop</span> }
23
- 1020:
24
- 1021: <span class="ruby-comment cmt"># restart</span>
25
- 1022: <span class="ruby-identifier">trap</span>(<span class="ruby-value str">&quot;USR2&quot;</span>) { <span class="ruby-identifier">log</span> <span class="ruby-value str">&quot;USR2 signal received.&quot;</span>; <span class="ruby-identifier">stop</span>(<span class="ruby-identifier">need_restart</span>=<span class="ruby-keyword kw">true</span>) }
26
- 1023:
27
- 1024: <span class="ruby-identifier">log</span> <span class="ruby-value str">&quot;Signals ready. TERM =&gt; stop. USR2 =&gt; restart. INT =&gt; stop (no restart).&quot;</span>
28
- 1025: <span class="ruby-keyword kw">else</span>
29
- 1026: <span class="ruby-identifier">log</span> <span class="ruby-value str">&quot;Signals ready. INT =&gt; stop (no restart).&quot;</span>
30
- 1027: <span class="ruby-keyword kw">end</span>
31
- 1028: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 977</span>
14
+ 977: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">join</span>
15
+ 978: <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
+ 979: <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>log (Mongrel::Configurator)</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 1031</span>
14
- 1031: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log</span>(<span class="ruby-identifier">msg</span>)
15
- 1032: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">print</span> <span class="ruby-value str">&quot;** &quot;</span>, <span class="ruby-identifier">msg</span>, <span class="ruby-value str">&quot;\n&quot;</span>
16
- 1033: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 997</span>
14
+ 997: <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
+ 998: <span class="ruby-identifier">require</span> <span class="ruby-value str">'mongrel/debug'</span>
16
+ 999: <span class="ruby-identifier">handlers</span> = {
17
+ 1000: <span class="ruby-identifier">:files</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;/handlers/requestlog::access&quot;</span>,
18
+ 1001: <span class="ruby-identifier">:rails</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;/handlers/requestlog::files&quot;</span>,
19
+ 1002: <span class="ruby-identifier">:object</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;/handlers/requestlog::objects&quot;</span>,
20
+ 1003: <span class="ruby-identifier">:threads</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;/handlers/requestlog::threads&quot;</span>,
21
+ 1004: <span class="ruby-identifier">:params</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;/handlers/requestlog::params&quot;</span>
22
+ 1005: }
23
+ 1006:
24
+ 1007: <span class="ruby-comment cmt"># turn on the debugging infrastructure, and ObjectTracker is a pig</span>
25
+ 1008: <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
+ 1009: <span class="ruby-constant">MongrelDbg</span>.<span class="ruby-identifier">configure</span>
27
+ 1010:
28
+ 1011: <span class="ruby-comment cmt"># now we roll through each requested debug type, turn it on and load that plugin</span>
29
+ 1012: <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
+ 1013: <span class="ruby-constant">MongrelDbg</span>.<span class="ruby-identifier">begin_trace</span> <span class="ruby-identifier">type</span>
31
+ 1014: <span class="ruby-identifier">uri</span> <span class="ruby-identifier">location</span>, <span class="ruby-identifier">:handler</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">plugin</span>(<span class="ruby-identifier">handlers</span>[<span class="ruby-identifier">type</span>])
32
+ 1015: <span class="ruby-keyword kw">end</span>
33
+ 1016: <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 1022</span>
14
+ 1022: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run_config</span>(<span class="ruby-identifier">script</span>)
15
+ 1023: <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
+ 1024: <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 1036</span>
14
+ 1036: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup_signals</span>(<span class="ruby-identifier">options</span>={})
15
+ 1037: <span class="ruby-identifier">ops</span> = <span class="ruby-identifier">resolve_defaults</span>(<span class="ruby-identifier">options</span>)
16
+ 1038:
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">&quot;INT&quot;</span>) { <span class="ruby-identifier">log</span> <span class="ruby-value str">&quot;INT signal received.&quot;</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">&quot;TERM&quot;</span>) { <span class="ruby-identifier">log</span> <span class="ruby-value str">&quot;TERM signal received.&quot;</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">&quot;USR2&quot;</span>) { <span class="ruby-identifier">log</span> <span class="ruby-value str">&quot;USR2 signal received.&quot;</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">&quot;Signals ready. TERM =&gt; stop. USR2 =&gt; restart. INT =&gt; stop (no restart).&quot;</span>
28
+ 1050: <span class="ruby-keyword kw">else</span>
29
+ 1051: <span class="ruby-identifier">log</span> <span class="ruby-value str">&quot;Signals ready. INT =&gt; stop (no restart).&quot;</span>
30
+ 1052: <span class="ruby-keyword kw">end</span>
31
+ 1053: <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 1056</span>
14
+ 1056: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log</span>(<span class="ruby-identifier">msg</span>)
15
+ 1057: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">print</span> <span class="ruby-value str">&quot;** &quot;</span>, <span class="ruby-identifier">msg</span>, <span class="ruby-value str">&quot;\n&quot;</span>
16
+ 1058: <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">&quot;0.3.13&quot;.freeze</td>
151
+ <td class="context-item-value">&quot;0.3.13.1&quot;.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>
@@ -305,6 +305,11 @@ win32)
305
305
  <td>=</td>
306
306
  <td class="context-item-value">&quot;HTTP_IF_NONE_MATCH&quot;.freeze</td>
307
307
  </tr>
308
+ <tr class="top-aligned-row context-row">
309
+ <td class="context-item-name">REDIRECT</td>
310
+ <td>=</td>
311
+ <td class="context-item-value">&quot;HTTP/1.1 302 Found\r\nLocation: %s\r\nConnection: close\r\n\r\n&quot;.freeze</td>
312
+ </tr>
308
313
  </table>
309
314
  </div>
310
315
  </div>
@@ -100,8 +100,8 @@ deflate everything even if the client can&#8217;t handle it.
100
100
  <h3 class="section-bar">Methods</h3>
101
101
 
102
102
  <div class="name-list">
103
- <a href="#M000094">new</a>&nbsp;&nbsp;
104
- <a href="#M000095">process</a>&nbsp;&nbsp;
103
+ <a href="#M000096">new</a>&nbsp;&nbsp;
104
+ <a href="#M000097">process</a>&nbsp;&nbsp;
105
105
  </div>
106
106
  </div>
107
107
 
@@ -136,12 +136,12 @@ deflate everything even if the client can&#8217;t handle it.
136
136
  <div id="methods">
137
137
  <h3 class="section-bar">Public Class methods</h3>
138
138
 
139
- <div id="method-M000094" class="method-detail">
140
- <a name="M000094"></a>
139
+ <div id="method-M000096" class="method-detail">
140
+ <a name="M000096"></a>
141
141
 
142
142
  <div class="method-heading">
143
- <a href="DeflateFilter.src/M000094.html" target="Code" class="method-signature"
144
- onclick="popupCode('DeflateFilter.src/M000094.html');return false;">
143
+ <a href="DeflateFilter.src/M000096.html" target="Code" class="method-signature"
144
+ onclick="popupCode('DeflateFilter.src/M000096.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&#8217;t handle it.
152
152
 
153
153
  <h3 class="section-bar">Public Instance methods</h3>
154
154
 
155
- <div id="method-M000095" class="method-detail">
156
- <a name="M000095"></a>
155
+ <div id="method-M000097" class="method-detail">
156
+ <a name="M000097"></a>
157
157
 
158
158
  <div class="method-heading">
159
- <a href="DeflateFilter.src/M000095.html" target="Code" class="method-signature"
160
- onclick="popupCode('DeflateFilter.src/M000095.html');return false;">
159
+ <a href="DeflateFilter.src/M000097.html" target="Code" class="method-signature"
160
+ onclick="popupCode('DeflateFilter.src/M000097.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 282</span>
14
- 282: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">ops</span>={})
15
- 283: <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">ops</span>
16
- 284: <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
- 285: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 293</span>
14
+ 293: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">ops</span>={})
15
+ 294: <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">ops</span>
16
+ 295: <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
+ 296: <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 287</span>
14
- 287: <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
- 288: <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
- 289: <span class="ruby-comment cmt"># only process if they support compression</span>
17
- 290: <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">&quot;deflate&quot;</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
- 291: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">header</span>[<span class="ruby-value str">&quot;Content-Encoding&quot;</span>] = <span class="ruby-value str">&quot;deflate&quot;</span>
19
- 292: <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
- 293: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">rewind</span>
21
- 294: <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
- 295: <span class="ruby-identifier">gzout</span>.<span class="ruby-identifier">rewind</span>
23
- 296: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">close</span>
24
- 297: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span> = <span class="ruby-identifier">gzout</span>
25
- 298: <span class="ruby-keyword kw">end</span>
26
- 299: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 298</span>
14
+ 298: <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
+ 299: <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
+ 300: <span class="ruby-comment cmt"># only process if they support compression</span>
17
+ 301: <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">&quot;deflate&quot;</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
+ 302: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">header</span>[<span class="ruby-value str">&quot;Content-Encoding&quot;</span>] = <span class="ruby-value str">&quot;deflate&quot;</span>
19
+ 303: <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
+ 304: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">rewind</span>
21
+ 305: <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
+ 306: <span class="ruby-identifier">gzout</span>.<span class="ruby-identifier">rewind</span>
23
+ 307: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">close</span>
24
+ 308: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span> = <span class="ruby-identifier">gzout</span>
25
+ 309: <span class="ruby-keyword kw">end</span>
26
+ 310: <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="#M000061">add_mime_type</a>&nbsp;&nbsp;
112
- <a href="#M000057">can_serve</a>&nbsp;&nbsp;
113
- <a href="#M000056">new</a>&nbsp;&nbsp;
114
- <a href="#M000060">process</a>&nbsp;&nbsp;
115
- <a href="#M000058">send_dir_listing</a>&nbsp;&nbsp;
116
- <a href="#M000059">send_file</a>&nbsp;&nbsp;
111
+ <a href="#M000062">add_mime_type</a>&nbsp;&nbsp;
112
+ <a href="#M000058">can_serve</a>&nbsp;&nbsp;
113
+ <a href="#M000057">new</a>&nbsp;&nbsp;
114
+ <a href="#M000061">process</a>&nbsp;&nbsp;
115
+ <a href="#M000059">send_dir_listing</a>&nbsp;&nbsp;
116
+ <a href="#M000060">send_file</a>&nbsp;&nbsp;
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-M000061" class="method-detail">
180
- <a name="M000061"></a>
179
+ <div id="method-M000062" class="method-detail">
180
+ <a name="M000062"></a>
181
181
 
182
182
  <div class="method-heading">
183
- <a href="DirHandler.src/M000061.html" target="Code" class="method-signature"
184
- onclick="popupCode('DirHandler.src/M000061.html');return false;">
183
+ <a href="DirHandler.src/M000062.html" target="Code" class="method-signature"
184
+ onclick="popupCode('DirHandler.src/M000062.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&#8217;ll need when serving content.
194
194
  </div>
195
195
  </div>
196
196
 
197
- <div id="method-M000056" class="method-detail">
198
- <a name="M000056"></a>
197
+ <div id="method-M000057" class="method-detail">
198
+ <a name="M000057"></a>
199
199
 
200
200
  <div class="method-heading">
201
- <a href="DirHandler.src/M000056.html" target="Code" class="method-signature"
202
- onclick="popupCode('DirHandler.src/M000056.html');return false;">
201
+ <a href="DirHandler.src/M000057.html" target="Code" class="method-signature"
202
+ onclick="popupCode('DirHandler.src/M000057.html');return false;">
203
203
  <span class="method-name">new</span><span class="method-args">(path, listing_allowed=true, index_html=&quot;index.html&quot;)</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-M000057" class="method-detail">
217
- <a name="M000057"></a>
216
+ <div id="method-M000058" class="method-detail">
217
+ <a name="M000058"></a>
218
218
 
219
219
  <div class="method-heading">
220
- <a href="DirHandler.src/M000057.html" target="Code" class="method-signature"
221
- onclick="popupCode('DirHandler.src/M000057.html');return false;">
220
+ <a href="DirHandler.src/M000058.html" target="Code" class="method-signature"
221
+ onclick="popupCode('DirHandler.src/M000058.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-M000060" class="method-detail">
235
- <a name="M000060"></a>
234
+ <div id="method-M000061" class="method-detail">
235
+ <a name="M000061"></a>
236
236
 
237
237
  <div class="method-heading">
238
- <a href="DirHandler.src/M000060.html" target="Code" class="method-signature"
239
- onclick="popupCode('DirHandler.src/M000060.html');return false;">
238
+ <a href="DirHandler.src/M000061.html" target="Code" class="method-signature"
239
+ onclick="popupCode('DirHandler.src/M000061.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-M000058" class="method-detail">
253
- <a name="M000058"></a>
252
+ <div id="method-M000059" class="method-detail">
253
+ <a name="M000059"></a>
254
254
 
255
255
  <div class="method-heading">
256
- <a href="DirHandler.src/M000058.html" target="Code" class="method-signature"
257
- onclick="popupCode('DirHandler.src/M000058.html');return false;">
256
+ <a href="DirHandler.src/M000059.html" target="Code" class="method-signature"
257
+ onclick="popupCode('DirHandler.src/M000059.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&#8217;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#M000057">can_serve</a>()), and response is the <a
267
+ href="DirHandler.html#M000058">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-M000059" class="method-detail">
274
- <a name="M000059"></a>
273
+ <div id="method-M000060" class="method-detail">
274
+ <a name="M000060"></a>
275
275
 
276
276
  <div class="method-heading">
277
- <a href="DirHandler.src/M000059.html" target="Code" class="method-signature"
278
- onclick="popupCode('DirHandler.src/M000059.html');return false;">
277
+ <a href="DirHandler.src/M000060.html" target="Code" class="method-signature"
278
+ onclick="popupCode('DirHandler.src/M000060.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>can_serve (Mongrel::DirHandler)</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 123</span>
14
- 123: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">can_serve</span>(<span class="ruby-identifier">path_info</span>)
15
- 124: <span class="ruby-comment cmt"># TODO: investigate freezing the path_info to prevent double escaping</span>
16
- 125: <span class="ruby-identifier">req_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-ivar">@path</span>,<span class="ruby-constant">HttpRequest</span>.<span class="ruby-identifier">unescape</span>(<span class="ruby-identifier">path_info</span>)), <span class="ruby-ivar">@path</span>)
17
- 126:
18
- 127: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">req_path</span>.<span class="ruby-identifier">index</span>(<span class="ruby-ivar">@path</span>) <span class="ruby-operator">==</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">and</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span> <span class="ruby-identifier">req_path</span>
19
- 128: <span class="ruby-comment cmt"># it exists and it's in the right location</span>
20
- 129: <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
- 130: <span class="ruby-comment cmt"># the request is for a directory</span>
22
- 131: <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
- 132: <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
- 133: <span class="ruby-comment cmt"># serve the index</span>
25
- 134: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">index</span>
26
- 135: <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@listing_allowed</span>
27
- 136: <span class="ruby-comment cmt"># serve the directory</span>
28
- 137: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">req_path</span>
29
- 138: <span class="ruby-keyword kw">else</span>
30
- 139: <span class="ruby-comment cmt"># do not serve anything</span>
31
- 140: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
32
- 141: <span class="ruby-keyword kw">end</span>
33
- 142: <span class="ruby-keyword kw">else</span>
34
- 143: <span class="ruby-comment cmt"># it's a file and it's there</span>
35
- 144: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">req_path</span>
36
- 145: <span class="ruby-keyword kw">end</span>
37
- 146: <span class="ruby-keyword kw">else</span>
38
- 147: <span class="ruby-comment cmt"># does not exist or isn't in the right spot</span>
39
- 148: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
40
- 149: <span class="ruby-keyword kw">end</span>
41
- 150: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 126</span>
14
+ 126: <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">&quot;index.html&quot;</span>)
15
+ 127: <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
+ 128: <span class="ruby-ivar">@listing_allowed</span>=<span class="ruby-identifier">listing_allowed</span>
17
+ 129: <span class="ruby-ivar">@index_html</span> = <span class="ruby-identifier">index_html</span>
18
+ 130: <span class="ruby-ivar">@default_content_type</span> = <span class="ruby-value str">&quot;text/plain; charset=ISO-8859-1&quot;</span>.<span class="ruby-identifier">freeze</span>
19
+ 131: <span class="ruby-keyword kw">end</span></pre>
42
20
  </body>
43
21
  </html>