mongrel 0.3.13.1 → 0.3.13.2

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