mongrel 0.3.13.2 → 0.3.13.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (183) hide show
  1. data/COPYING +39 -488
  2. data/LICENSE +39 -488
  3. data/Rakefile +1 -1
  4. data/bin/mongrel_rails +8 -0
  5. data/doc/rdoc/classes/IO.src/M000001.html +5 -5
  6. data/doc/rdoc/classes/IO.src/M000002.html +5 -5
  7. data/doc/rdoc/classes/Kernel.src/M000020.html +5 -5
  8. data/doc/rdoc/classes/Kernel.src/M000021.html +9 -9
  9. data/doc/rdoc/classes/Mongrel.html +4 -22
  10. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000101.html +10 -10
  11. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000102.html +33 -33
  12. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000103.html +20 -20
  13. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000104.html +13 -13
  14. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000105.html +11 -11
  15. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000106.html +4 -4
  16. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000107.html +4 -4
  17. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000108.html +4 -4
  18. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000109.html +5 -5
  19. data/doc/rdoc/classes/Mongrel/Camping.src/M000048.html +8 -8
  20. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000049.html +4 -4
  21. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000050.html +36 -36
  22. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000026.html +10 -10
  23. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000027.html +28 -28
  24. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000028.html +4 -4
  25. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000029.html +4 -4
  26. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000030.html +4 -4
  27. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000031.html +4 -4
  28. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000032.html +8 -8
  29. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000033.html +4 -4
  30. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000034.html +4 -4
  31. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000035.html +4 -4
  32. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000036.html +10 -10
  33. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000037.html +10 -10
  34. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000038.html +4 -4
  35. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000039.html +6 -6
  36. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000040.html +11 -11
  37. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000041.html +33 -33
  38. data/doc/rdoc/classes/Mongrel/Configurator.html +2 -2
  39. data/doc/rdoc/classes/Mongrel/Configurator.src/M000110.html +13 -13
  40. data/doc/rdoc/classes/Mongrel/Configurator.src/M000111.html +17 -17
  41. data/doc/rdoc/classes/Mongrel/Configurator.src/M000112.html +6 -6
  42. data/doc/rdoc/classes/Mongrel/Configurator.src/M000113.html +6 -6
  43. data/doc/rdoc/classes/Mongrel/Configurator.src/M000114.html +9 -9
  44. data/doc/rdoc/classes/Mongrel/Configurator.src/M000115.html +4 -4
  45. data/doc/rdoc/classes/Mongrel/Configurator.src/M000116.html +23 -23
  46. data/doc/rdoc/classes/Mongrel/Configurator.src/M000117.html +5 -5
  47. data/doc/rdoc/classes/Mongrel/Configurator.src/M000118.html +16 -16
  48. data/doc/rdoc/classes/Mongrel/Configurator.src/M000119.html +18 -18
  49. data/doc/rdoc/classes/Mongrel/Configurator.src/M000120.html +4 -4
  50. data/doc/rdoc/classes/Mongrel/Configurator.src/M000121.html +10 -10
  51. data/doc/rdoc/classes/Mongrel/Configurator.src/M000122.html +5 -5
  52. data/doc/rdoc/classes/Mongrel/Configurator.src/M000123.html +4 -4
  53. data/doc/rdoc/classes/Mongrel/Configurator.src/M000124.html +8 -8
  54. data/doc/rdoc/classes/Mongrel/Configurator.src/M000125.html +11 -11
  55. data/doc/rdoc/classes/Mongrel/Configurator.src/M000126.html +4 -4
  56. data/doc/rdoc/classes/Mongrel/Configurator.src/M000127.html +21 -21
  57. data/doc/rdoc/classes/Mongrel/Configurator.src/M000128.html +4 -4
  58. data/doc/rdoc/classes/Mongrel/Configurator.src/M000129.html +19 -19
  59. data/doc/rdoc/classes/Mongrel/Configurator.src/M000130.html +4 -4
  60. data/doc/rdoc/classes/Mongrel/Const.html +1 -1
  61. data/doc/rdoc/classes/Mongrel/DeflateFilter.src/M000099.html +5 -5
  62. data/doc/rdoc/classes/Mongrel/DeflateFilter.src/M000100.html +14 -14
  63. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000058.html +7 -7
  64. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000059.html +29 -29
  65. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000060.html +28 -28
  66. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000061.html +48 -48
  67. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000062.html +25 -25
  68. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000063.html +4 -4
  69. data/doc/rdoc/classes/Mongrel/Error404Handler.src/M000131.html +4 -4
  70. data/doc/rdoc/classes/Mongrel/Error404Handler.src/M000132.html +4 -4
  71. data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000072.html +4 -4
  72. data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000073.html +4 -4
  73. data/doc/rdoc/classes/Mongrel/HttpHandler.src/M000078.html +3 -3
  74. data/doc/rdoc/classes/Mongrel/HttpHandler.src/M000079.html +3 -3
  75. data/doc/rdoc/classes/Mongrel/HttpHandler.src/M000080.html +3 -3
  76. data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000022.html +3 -3
  77. data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000023.html +3 -3
  78. data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000024.html +5 -5
  79. data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000025.html +3 -3
  80. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000138.html +42 -42
  81. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000139.html +6 -6
  82. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000140.html +6 -6
  83. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000141.html +18 -18
  84. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000081.html +11 -11
  85. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000082.html +6 -6
  86. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000083.html +11 -11
  87. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000084.html +8 -8
  88. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000085.html +8 -8
  89. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000086.html +8 -8
  90. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000087.html +17 -17
  91. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000088.html +7 -7
  92. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000089.html +6 -6
  93. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000090.html +6 -6
  94. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000091.html +6 -6
  95. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000092.html +4 -4
  96. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000064.html +11 -11
  97. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000065.html +71 -71
  98. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000066.html +17 -17
  99. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000067.html +7 -7
  100. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000068.html +36 -37
  101. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000069.html +20 -20
  102. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000070.html +4 -4
  103. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000071.html +8 -8
  104. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000042.html +25 -25
  105. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000043.html +11 -11
  106. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000044.html +12 -12
  107. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000045.html +8 -8
  108. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000046.html +36 -36
  109. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000047.html +9 -9
  110. data/doc/rdoc/classes/Mongrel/RedirectHandler.src/M000136.html +8 -8
  111. data/doc/rdoc/classes/Mongrel/RedirectHandler.src/M000137.html +13 -13
  112. data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/M000133.html +10 -10
  113. data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/M000134.html +10 -10
  114. data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/M000135.html +4 -4
  115. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000074.html +4 -4
  116. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000075.html +10 -10
  117. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000076.html +28 -28
  118. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000077.html +6 -6
  119. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000093.html +4 -4
  120. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000094.html +4 -4
  121. data/doc/rdoc/classes/MongrelDbg.src/M000015.html +5 -5
  122. data/doc/rdoc/classes/MongrelDbg.src/M000016.html +6 -6
  123. data/doc/rdoc/classes/MongrelDbg.src/M000017.html +8 -8
  124. data/doc/rdoc/classes/MongrelDbg.src/M000018.html +7 -7
  125. data/doc/rdoc/classes/MongrelDbg.src/M000019.html +4 -4
  126. data/doc/rdoc/classes/ObjectTracker.src/M000013.html +13 -13
  127. data/doc/rdoc/classes/ObjectTracker.src/M000014.html +30 -30
  128. data/doc/rdoc/classes/RequestLog/Access.src/M000142.html +5 -5
  129. data/doc/rdoc/classes/RequestLog/Files.src/M000143.html +5 -5
  130. data/doc/rdoc/classes/RequestLog/Objects.src/M000145.html +5 -5
  131. data/doc/rdoc/classes/RequestLog/Params.src/M000146.html +5 -5
  132. data/doc/rdoc/classes/RequestLog/Threads.src/M000144.html +20 -20
  133. data/doc/rdoc/classes/Stats.src/M000005.html +5 -5
  134. data/doc/rdoc/classes/Stats.src/M000006.html +9 -9
  135. data/doc/rdoc/classes/Stats.src/M000007.html +12 -12
  136. data/doc/rdoc/classes/Stats.src/M000008.html +4 -4
  137. data/doc/rdoc/classes/Stats.src/M000009.html +4 -4
  138. data/doc/rdoc/classes/Stats.src/M000010.html +4 -4
  139. data/doc/rdoc/classes/Stats.src/M000011.html +9 -9
  140. data/doc/rdoc/classes/Stats.src/M000012.html +6 -6
  141. data/doc/rdoc/classes/TCPServer.src/M000003.html +5 -5
  142. data/doc/rdoc/created.rid +1 -1
  143. data/doc/rdoc/files/COPYING.html +51 -639
  144. data/doc/rdoc/files/LICENSE.html +51 -639
  145. data/doc/rdoc/files/ext/http11/http11_c.html +1 -1
  146. data/doc/rdoc/files/lib/mongrel/camping_rb.html +6 -21
  147. data/doc/rdoc/files/lib/mongrel/cgi_rb.html +6 -21
  148. data/doc/rdoc/files/lib/mongrel/command_rb.html +6 -21
  149. data/doc/rdoc/files/lib/mongrel/debug_rb.html +6 -21
  150. data/doc/rdoc/files/lib/mongrel/handlers_rb.html +13 -1
  151. data/doc/rdoc/files/lib/mongrel/init_rb.html +6 -21
  152. data/doc/rdoc/files/lib/mongrel/rails_rb.html +6 -21
  153. data/doc/rdoc/files/lib/mongrel/stats_rb.html +6 -21
  154. data/doc/rdoc/files/lib/mongrel/tcphack_rb.html +6 -21
  155. data/doc/rdoc/files/lib/mongrel_rb.html +6 -21
  156. data/ext/http11/http11.c +4 -19
  157. data/ext/http11/http11_parser.c +48 -63
  158. data/ext/http11/http11_parser.h +3 -17
  159. data/lib/http11.so +0 -0
  160. data/lib/mongrel.rb +10 -23
  161. data/lib/mongrel/camping.rb +4 -16
  162. data/lib/mongrel/cgi.rb +4 -16
  163. data/lib/mongrel/command.rb +4 -16
  164. data/lib/mongrel/debug.rb +4 -16
  165. data/lib/mongrel/handlers.rb +6 -17
  166. data/lib/mongrel/init.rb +4 -16
  167. data/lib/mongrel/rails.rb +4 -16
  168. data/lib/mongrel/stats.rb +4 -16
  169. data/lib/mongrel/tcphack.rb +4 -16
  170. data/test/test_command.rb +4 -16
  171. data/test/test_conditional.rb +4 -16
  172. data/test/test_configurator.rb +4 -16
  173. data/test/test_debug.rb +4 -16
  174. data/test/test_handlers.rb +4 -16
  175. data/test/test_http11.rb +4 -16
  176. data/test/test_redirect_handler.rb +6 -0
  177. data/test/test_request_progress.rb +58 -0
  178. data/test/test_response.rb +4 -16
  179. data/test/test_stats.rb +4 -16
  180. data/test/test_uriclassifier.rb +4 -16
  181. data/test/test_ws.rb +4 -16
  182. data/test/testhelp.rb +6 -0
  183. metadata +5 -2
@@ -10,25 +10,25 @@
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 678</span>
14
- 678: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">register</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">handler</span>, <span class="ruby-identifier">in_front</span>=<span class="ruby-keyword kw">false</span>)
15
- 679: <span class="ruby-identifier">script_name</span>, <span class="ruby-identifier">path_info</span>, <span class="ruby-identifier">handlers</span> = <span class="ruby-ivar">@classifier</span>.<span class="ruby-identifier">resolve</span>(<span class="ruby-identifier">uri</span>)
16
- 680:
17
- 681: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">handlers</span>
18
- 682: <span class="ruby-ivar">@classifier</span>.<span class="ruby-identifier">register</span>(<span class="ruby-identifier">uri</span>, [<span class="ruby-identifier">handler</span>])
19
- 683: <span class="ruby-keyword kw">else</span>
20
- 684: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">path_info</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">or</span> (<span class="ruby-identifier">script_name</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">SLASH</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">path_info</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">SLASH</span>)
21
- 685: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">in_front</span>
22
- 686: <span class="ruby-identifier">handlers</span>.<span class="ruby-identifier">unshift</span>(<span class="ruby-identifier">handler</span>)
23
- 687: <span class="ruby-keyword kw">else</span>
24
- 688: <span class="ruby-identifier">handlers</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">handler</span>
25
- 689: <span class="ruby-keyword kw">end</span>
26
- 690: <span class="ruby-keyword kw">else</span>
27
- 691: <span class="ruby-ivar">@classifier</span>.<span class="ruby-identifier">register</span>(<span class="ruby-identifier">uri</span>, [<span class="ruby-identifier">handler</span>])
28
- 692: <span class="ruby-keyword kw">end</span>
29
- 693: <span class="ruby-keyword kw">end</span>
30
- 694:
31
- 695: <span class="ruby-identifier">handler</span>.<span class="ruby-identifier">listener</span> = <span class="ruby-keyword kw">self</span>
32
- 696: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 665</span>
14
+ 665: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">register</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">handler</span>, <span class="ruby-identifier">in_front</span>=<span class="ruby-keyword kw">false</span>)
15
+ 666: <span class="ruby-identifier">script_name</span>, <span class="ruby-identifier">path_info</span>, <span class="ruby-identifier">handlers</span> = <span class="ruby-ivar">@classifier</span>.<span class="ruby-identifier">resolve</span>(<span class="ruby-identifier">uri</span>)
16
+ 667:
17
+ 668: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">handlers</span>
18
+ 669: <span class="ruby-ivar">@classifier</span>.<span class="ruby-identifier">register</span>(<span class="ruby-identifier">uri</span>, [<span class="ruby-identifier">handler</span>])
19
+ 670: <span class="ruby-keyword kw">else</span>
20
+ 671: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">path_info</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">or</span> (<span class="ruby-identifier">script_name</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">SLASH</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">path_info</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">SLASH</span>)
21
+ 672: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">in_front</span>
22
+ 673: <span class="ruby-identifier">handlers</span>.<span class="ruby-identifier">unshift</span>(<span class="ruby-identifier">handler</span>)
23
+ 674: <span class="ruby-keyword kw">else</span>
24
+ 675: <span class="ruby-identifier">handlers</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">handler</span>
25
+ 676: <span class="ruby-keyword kw">end</span>
26
+ 677: <span class="ruby-keyword kw">else</span>
27
+ 678: <span class="ruby-ivar">@classifier</span>.<span class="ruby-identifier">register</span>(<span class="ruby-identifier">uri</span>, [<span class="ruby-identifier">handler</span>])
28
+ 679: <span class="ruby-keyword kw">end</span>
29
+ 680: <span class="ruby-keyword kw">end</span>
30
+ 681:
31
+ 682: <span class="ruby-identifier">handler</span>.<span class="ruby-identifier">listener</span> = <span class="ruby-keyword kw">self</span>
32
+ 683: <span class="ruby-keyword kw">end</span></pre>
33
33
  </body>
34
34
  </html>
@@ -10,9 +10,9 @@
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 701</span>
14
- 701: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unregister</span>(<span class="ruby-identifier">uri</span>)
15
- 702: <span class="ruby-ivar">@classifier</span>.<span class="ruby-identifier">unregister</span>(<span class="ruby-identifier">uri</span>)
16
- 703: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 688</span>
14
+ 688: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unregister</span>(<span class="ruby-identifier">uri</span>)
15
+ 689: <span class="ruby-ivar">@classifier</span>.<span class="ruby-identifier">unregister</span>(<span class="ruby-identifier">uri</span>)
16
+ 690: <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -10,13 +10,13 @@
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 707</span>
14
- 707: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stop</span>
15
- 708: <span class="ruby-identifier">stopper</span> = <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span>
16
- 709: <span class="ruby-identifier">exc</span> = <span class="ruby-constant">StopServer</span>.<span class="ruby-identifier">new</span>
17
- 710: <span class="ruby-ivar">@acceptor</span>.<span class="ruby-identifier">raise</span>(<span class="ruby-identifier">exc</span>)
18
- 711: <span class="ruby-keyword kw">end</span>
19
- 712: <span class="ruby-identifier">stopper</span>.<span class="ruby-identifier">priority</span> = <span class="ruby-value">10</span>
20
- 713: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 694</span>
14
+ 694: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stop</span>
15
+ 695: <span class="ruby-identifier">stopper</span> = <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span>
16
+ 696: <span class="ruby-identifier">exc</span> = <span class="ruby-constant">StopServer</span>.<span class="ruby-identifier">new</span>
17
+ 697: <span class="ruby-ivar">@acceptor</span>.<span class="ruby-identifier">raise</span>(<span class="ruby-identifier">exc</span>)
18
+ 698: <span class="ruby-keyword kw">end</span>
19
+ 699: <span class="ruby-identifier">stopper</span>.<span class="ruby-identifier">priority</span> = <span class="ruby-value">10</span>
20
+ 700: <span class="ruby-keyword kw">end</span></pre>
21
21
  </body>
22
22
  </html>
@@ -10,30 +10,30 @@
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/rails.rb, line 141</span>
14
- 141: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rails</span>(<span class="ruby-identifier">options</span>={})
15
- 142:
16
- 143: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@rails_handler</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@rails_handler</span>
17
- 144:
18
- 145: <span class="ruby-identifier">ops</span> = <span class="ruby-identifier">resolve_defaults</span>(<span class="ruby-identifier">options</span>)
19
- 146:
20
- 147: <span class="ruby-comment cmt"># fix up some defaults</span>
21
- 148: <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:environment</span>] <span class="ruby-operator">||=</span> <span class="ruby-value str">&quot;development&quot;</span>
22
- 149: <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:docroot</span>] <span class="ruby-operator">||=</span> <span class="ruby-value str">&quot;public&quot;</span>
23
- 150: <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:mime</span>] <span class="ruby-operator">||=</span> {}
24
- 151:
25
- 152:
26
- 153: <span class="ruby-identifier">$orig_dollar_quote</span> = <span class="ruby-identifier">$&quot;</span>.<span class="ruby-identifier">clone</span>
27
- 154: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'RAILS_ENV'</span>] = <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:environment</span>]
28
- 155: <span class="ruby-identifier">env_location</span> = <span class="ruby-node">&quot;#{ops[:cwd]}/config/environment&quot;</span>
29
- 156: <span class="ruby-identifier">require</span> <span class="ruby-identifier">env_location</span>
30
- 157: <span class="ruby-identifier">require</span> <span class="ruby-value str">'dispatcher'</span>
31
- 158: <span class="ruby-identifier">require</span> <span class="ruby-value str">'mongrel/rails'</span>
32
- 159:
33
- 160: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">ActionController</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">allow_concurrency</span>
34
- 161: <span class="ruby-identifier">log</span> <span class="ruby-value str">&quot;[RAILS] ActionController::Base.allow_concurrency is true. Wow, you're very brave.&quot;</span>
35
- 162: <span class="ruby-keyword kw">end</span>
36
- 163: <span class="ruby-ivar">@rails_handler</span> = <span class="ruby-constant">RailsHandler</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:docroot</span>], <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:mime</span>])
37
- 164: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel/rails.rb, line 129</span>
14
+ 129: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rails</span>(<span class="ruby-identifier">options</span>={})
15
+ 130:
16
+ 131: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@rails_handler</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@rails_handler</span>
17
+ 132:
18
+ 133: <span class="ruby-identifier">ops</span> = <span class="ruby-identifier">resolve_defaults</span>(<span class="ruby-identifier">options</span>)
19
+ 134:
20
+ 135: <span class="ruby-comment cmt"># fix up some defaults</span>
21
+ 136: <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:environment</span>] <span class="ruby-operator">||=</span> <span class="ruby-value str">&quot;development&quot;</span>
22
+ 137: <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:docroot</span>] <span class="ruby-operator">||=</span> <span class="ruby-value str">&quot;public&quot;</span>
23
+ 138: <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:mime</span>] <span class="ruby-operator">||=</span> {}
24
+ 139:
25
+ 140:
26
+ 141: <span class="ruby-identifier">$orig_dollar_quote</span> = <span class="ruby-identifier">$&quot;</span>.<span class="ruby-identifier">clone</span>
27
+ 142: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'RAILS_ENV'</span>] = <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:environment</span>]
28
+ 143: <span class="ruby-identifier">env_location</span> = <span class="ruby-node">&quot;#{ops[:cwd]}/config/environment&quot;</span>
29
+ 144: <span class="ruby-identifier">require</span> <span class="ruby-identifier">env_location</span>
30
+ 145: <span class="ruby-identifier">require</span> <span class="ruby-value str">'dispatcher'</span>
31
+ 146: <span class="ruby-identifier">require</span> <span class="ruby-value str">'mongrel/rails'</span>
32
+ 147:
33
+ 148: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">ActionController</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">allow_concurrency</span>
34
+ 149: <span class="ruby-identifier">log</span> <span class="ruby-value str">&quot;[RAILS] ActionController::Base.allow_concurrency is true. Wow, you're very brave.&quot;</span>
35
+ 150: <span class="ruby-keyword kw">end</span>
36
+ 151: <span class="ruby-ivar">@rails_handler</span> = <span class="ruby-constant">RailsHandler</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:docroot</span>], <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:mime</span>])
37
+ 152: <span class="ruby-keyword kw">end</span></pre>
38
38
  </body>
39
39
  </html>
@@ -10,16 +10,16 @@
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/rails.rb, line 170</span>
14
- 170: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reload!</span>
15
- 171: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@rails_handler</span>
16
- 172: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Rails was not configured. Read the docs for RailsConfigurator.&quot;</span>
17
- 173: <span class="ruby-keyword kw">end</span>
18
- 174:
19
- 175: <span class="ruby-identifier">log</span> <span class="ruby-value str">&quot;Reloading rails...&quot;</span>
20
- 176: <span class="ruby-ivar">@rails_handler</span>.<span class="ruby-identifier">reload!</span>
21
- 177: <span class="ruby-identifier">log</span> <span class="ruby-value str">&quot;Done reloading rails.&quot;</span>
22
- 178:
23
- 179: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel/rails.rb, line 158</span>
14
+ 158: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reload!</span>
15
+ 159: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@rails_handler</span>
16
+ 160: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Rails was not configured. Read the docs for RailsConfigurator.&quot;</span>
17
+ 161: <span class="ruby-keyword kw">end</span>
18
+ 162:
19
+ 163: <span class="ruby-identifier">log</span> <span class="ruby-value str">&quot;Reloading rails...&quot;</span>
20
+ 164: <span class="ruby-ivar">@rails_handler</span>.<span class="ruby-identifier">reload!</span>
21
+ 165: <span class="ruby-identifier">log</span> <span class="ruby-value str">&quot;Done reloading rails.&quot;</span>
22
+ 166:
23
+ 167: <span class="ruby-keyword kw">end</span></pre>
24
24
  </body>
25
25
  </html>
@@ -10,17 +10,17 @@
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/rails.rb, line 183</span>
14
- 183: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup_rails_signals</span>(<span class="ruby-identifier">options</span>={})
15
- 184: <span class="ruby-identifier">ops</span> = <span class="ruby-identifier">resolve_defaults</span>(<span class="ruby-identifier">options</span>)
16
- 185: <span class="ruby-identifier">setup_signals</span>(<span class="ruby-identifier">options</span>)
17
- 186:
18
- 187: <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>
19
- 188: <span class="ruby-comment cmt"># rails reload</span>
20
- 189: <span class="ruby-identifier">trap</span>(<span class="ruby-value str">&quot;HUP&quot;</span>) { <span class="ruby-identifier">log</span> <span class="ruby-value str">&quot;HUP signal received.&quot;</span>; <span class="ruby-identifier">reload!</span> }
21
- 190:
22
- 191: <span class="ruby-identifier">log</span> <span class="ruby-value str">&quot;Rails signals registered. HUP =&gt; reload (without restart). It might not work well.&quot;</span>
23
- 192: <span class="ruby-keyword kw">end</span>
24
- 193: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel/rails.rb, line 171</span>
14
+ 171: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup_rails_signals</span>(<span class="ruby-identifier">options</span>={})
15
+ 172: <span class="ruby-identifier">ops</span> = <span class="ruby-identifier">resolve_defaults</span>(<span class="ruby-identifier">options</span>)
16
+ 173: <span class="ruby-identifier">setup_signals</span>(<span class="ruby-identifier">options</span>)
17
+ 174:
18
+ 175: <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>
19
+ 176: <span class="ruby-comment cmt"># rails reload</span>
20
+ 177: <span class="ruby-identifier">trap</span>(<span class="ruby-value str">&quot;HUP&quot;</span>) { <span class="ruby-identifier">log</span> <span class="ruby-value str">&quot;HUP signal received.&quot;</span>; <span class="ruby-identifier">reload!</span> }
21
+ 178:
22
+ 179: <span class="ruby-identifier">log</span> <span class="ruby-value str">&quot;Rails signals registered. HUP =&gt; reload (without restart). It might not work well.&quot;</span>
23
+ 180: <span class="ruby-keyword kw">end</span>
24
+ 181: <span class="ruby-keyword kw">end</span></pre>
25
25
  </body>
26
26
  </html>
@@ -10,13 +10,13 @@
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/rails.rb, line 49</span>
14
- 49: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">dir</span>, <span class="ruby-identifier">mime_map</span> = {})
15
- 50: <span class="ruby-ivar">@files</span> = <span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">DirHandler</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">dir</span>,<span class="ruby-keyword kw">false</span>)
16
- 51: <span class="ruby-ivar">@guard</span> = <span class="ruby-constant">Mutex</span>.<span class="ruby-identifier">new</span>
17
- 52:
18
- 53: <span class="ruby-comment cmt"># register the requested mime types</span>
19
- 54: <span class="ruby-identifier">mime_map</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">DirHandler</span><span class="ruby-operator">::</span><span class="ruby-identifier">add_mime_type</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>) }
20
- 55: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel/rails.rb, line 37</span>
14
+ 37: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">dir</span>, <span class="ruby-identifier">mime_map</span> = {})
15
+ 38: <span class="ruby-ivar">@files</span> = <span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">DirHandler</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">dir</span>,<span class="ruby-keyword kw">false</span>)
16
+ 39: <span class="ruby-ivar">@guard</span> = <span class="ruby-constant">Mutex</span>.<span class="ruby-identifier">new</span>
17
+ 40:
18
+ 41: <span class="ruby-comment cmt"># register the requested mime types</span>
19
+ 42: <span class="ruby-identifier">mime_map</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">DirHandler</span><span class="ruby-operator">::</span><span class="ruby-identifier">add_mime_type</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>) }
20
+ 43: <span class="ruby-keyword kw">end</span></pre>
21
21
  </body>
22
22
  </html>
@@ -10,42 +10,42 @@
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/rails.rb, line 63</span>
14
- 63: <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
- 64: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">socket</span>.<span class="ruby-identifier">closed?</span>
16
- 65:
17
- 66: <span class="ruby-identifier">path_info</span> = <span class="ruby-identifier">request</span>.<span class="ruby-identifier">params</span>[<span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">PATH_INFO</span>]
18
- 67: <span class="ruby-identifier">page_cached</span> = <span class="ruby-identifier">path_info</span> <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;.html&quot;</span>
19
- 68: <span class="ruby-identifier">get_or_head</span> = <span class="ruby-ivar">@@file_only_methods</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">request</span>.<span class="ruby-identifier">params</span>[<span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">REQUEST_METHOD</span>]
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel/rails.rb, line 51</span>
14
+ 51: <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
+ 52: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">socket</span>.<span class="ruby-identifier">closed?</span>
16
+ 53:
17
+ 54: <span class="ruby-identifier">path_info</span> = <span class="ruby-identifier">request</span>.<span class="ruby-identifier">params</span>[<span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">PATH_INFO</span>]
18
+ 55: <span class="ruby-identifier">page_cached</span> = <span class="ruby-identifier">path_info</span> <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;.html&quot;</span>
19
+ 56: <span class="ruby-identifier">get_or_head</span> = <span class="ruby-ivar">@@file_only_methods</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">request</span>.<span class="ruby-identifier">params</span>[<span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">REQUEST_METHOD</span>]
20
+ 57:
21
+ 58: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">get_or_head</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@files</span>.<span class="ruby-identifier">can_serve</span>(<span class="ruby-identifier">path_info</span>)
22
+ 59: <span class="ruby-comment cmt"># File exists as-is so serve it up</span>
23
+ 60: <span class="ruby-ivar">@files</span>.<span class="ruby-identifier">process</span>(<span class="ruby-identifier">request</span>,<span class="ruby-identifier">response</span>)
24
+ 61: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">get_or_head</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@files</span>.<span class="ruby-identifier">can_serve</span>(<span class="ruby-identifier">page_cached</span>)
25
+ 62: <span class="ruby-comment cmt"># possible cached page, serve it up </span>
26
+ 63: <span class="ruby-identifier">request</span>.<span class="ruby-identifier">params</span>[<span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">PATH_INFO</span>] = <span class="ruby-identifier">page_cached</span>
27
+ 64: <span class="ruby-ivar">@files</span>.<span class="ruby-identifier">process</span>(<span class="ruby-identifier">request</span>,<span class="ruby-identifier">response</span>)
28
+ 65: <span class="ruby-keyword kw">else</span>
29
+ 66: <span class="ruby-keyword kw">begin</span>
30
+ 67: <span class="ruby-identifier">cgi</span> = <span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">CGIWrapper</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">request</span>, <span class="ruby-identifier">response</span>)
31
+ 68: <span class="ruby-identifier">cgi</span>.<span class="ruby-identifier">handler</span> = <span class="ruby-keyword kw">self</span>
20
32
  69:
21
- 70: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">get_or_head</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@files</span>.<span class="ruby-identifier">can_serve</span>(<span class="ruby-identifier">path_info</span>)
22
- 71: <span class="ruby-comment cmt"># File exists as-is so serve it up</span>
23
- 72: <span class="ruby-ivar">@files</span>.<span class="ruby-identifier">process</span>(<span class="ruby-identifier">request</span>,<span class="ruby-identifier">response</span>)
24
- 73: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">get_or_head</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@files</span>.<span class="ruby-identifier">can_serve</span>(<span class="ruby-identifier">page_cached</span>)
25
- 74: <span class="ruby-comment cmt"># possible cached page, serve it up </span>
26
- 75: <span class="ruby-identifier">request</span>.<span class="ruby-identifier">params</span>[<span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">PATH_INFO</span>] = <span class="ruby-identifier">page_cached</span>
27
- 76: <span class="ruby-ivar">@files</span>.<span class="ruby-identifier">process</span>(<span class="ruby-identifier">request</span>,<span class="ruby-identifier">response</span>)
28
- 77: <span class="ruby-keyword kw">else</span>
29
- 78: <span class="ruby-keyword kw">begin</span>
30
- 79: <span class="ruby-identifier">cgi</span> = <span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">CGIWrapper</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">request</span>, <span class="ruby-identifier">response</span>)
31
- 80: <span class="ruby-identifier">cgi</span>.<span class="ruby-identifier">handler</span> = <span class="ruby-keyword kw">self</span>
32
- 81:
33
- 82: <span class="ruby-comment cmt"># ultra dangerous, but people are asking to kill themselves. here's the Katana</span>
34
- 83: <span class="ruby-ivar">@guard</span>.<span class="ruby-identifier">lock</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">ActionController</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">allow_concurrency</span>
35
- 84:
36
- 85: <span class="ruby-constant">Dispatcher</span>.<span class="ruby-identifier">dispatch</span>(<span class="ruby-identifier">cgi</span>, <span class="ruby-constant">ActionController</span><span class="ruby-operator">::</span><span class="ruby-constant">CgiRequest</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_SESSION_OPTIONS</span>, <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>)
37
- 86:
38
- 87: <span class="ruby-comment cmt"># This finalizes the output using the proper HttpResponse way</span>
39
- 88: <span class="ruby-identifier">cgi</span>.<span class="ruby-identifier">out</span> {<span class="ruby-value str">&quot;&quot;</span>}
40
- 89: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">EPIPE</span>
41
- 90: <span class="ruby-comment cmt"># ignored</span>
42
- 91: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Object</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">rails_error</span>
43
- 92: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Error calling Dispatcher.dispatch #{rails_error.inspect}&quot;</span>
44
- 93: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">rails_error</span>.<span class="ruby-identifier">backtrace</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;\n&quot;</span>)
45
- 94: <span class="ruby-keyword kw">ensure</span>
46
- 95: <span class="ruby-ivar">@guard</span>.<span class="ruby-identifier">unlock</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">ActionController</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">allow_concurrency</span>
47
- 96: <span class="ruby-keyword kw">end</span>
48
- 97: <span class="ruby-keyword kw">end</span>
49
- 98: <span class="ruby-keyword kw">end</span></pre>
33
+ 70: <span class="ruby-comment cmt"># ultra dangerous, but people are asking to kill themselves. here's the Katana</span>
34
+ 71: <span class="ruby-ivar">@guard</span>.<span class="ruby-identifier">lock</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">ActionController</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">allow_concurrency</span>
35
+ 72:
36
+ 73: <span class="ruby-constant">Dispatcher</span>.<span class="ruby-identifier">dispatch</span>(<span class="ruby-identifier">cgi</span>, <span class="ruby-constant">ActionController</span><span class="ruby-operator">::</span><span class="ruby-constant">CgiRequest</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_SESSION_OPTIONS</span>, <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>)
37
+ 74:
38
+ 75: <span class="ruby-comment cmt"># This finalizes the output using the proper HttpResponse way</span>
39
+ 76: <span class="ruby-identifier">cgi</span>.<span class="ruby-identifier">out</span> {<span class="ruby-value str">&quot;&quot;</span>}
40
+ 77: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">EPIPE</span>
41
+ 78: <span class="ruby-comment cmt"># ignored</span>
42
+ 79: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Object</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">rails_error</span>
43
+ 80: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Error calling Dispatcher.dispatch #{rails_error.inspect}&quot;</span>
44
+ 81: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">rails_error</span>.<span class="ruby-identifier">backtrace</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;\n&quot;</span>)
45
+ 82: <span class="ruby-keyword kw">ensure</span>
46
+ 83: <span class="ruby-ivar">@guard</span>.<span class="ruby-identifier">unlock</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">ActionController</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">allow_concurrency</span>
47
+ 84: <span class="ruby-keyword kw">end</span>
48
+ 85: <span class="ruby-keyword kw">end</span>
49
+ 86: <span class="ruby-keyword kw">end</span></pre>
50
50
  </body>
51
51
  </html>
@@ -10,14 +10,14 @@
10
10
  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/rails.rb, line 103</span>
14
- 103: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reload!</span>
15
- 104: <span class="ruby-ivar">@guard</span>.<span class="ruby-identifier">synchronize</span> <span class="ruby-keyword kw">do</span>
16
- 105: <span class="ruby-identifier">$&quot;</span>.<span class="ruby-identifier">replace</span> <span class="ruby-identifier">$orig_dollar_quote</span>
17
- 106: <span class="ruby-constant">GC</span>.<span class="ruby-identifier">start</span>
18
- 107: <span class="ruby-constant">Dispatcher</span>.<span class="ruby-identifier">reset_application!</span>
19
- 108: <span class="ruby-constant">ActionController</span><span class="ruby-operator">::</span><span class="ruby-constant">Routing</span><span class="ruby-operator">::</span><span class="ruby-constant">Routes</span>.<span class="ruby-identifier">reload</span>
20
- 109: <span class="ruby-keyword kw">end</span>
21
- 110: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel/rails.rb, line 91</span>
14
+ 91: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reload!</span>
15
+ 92: <span class="ruby-ivar">@guard</span>.<span class="ruby-identifier">synchronize</span> <span class="ruby-keyword kw">do</span>
16
+ 93: <span class="ruby-identifier">$&quot;</span>.<span class="ruby-identifier">replace</span> <span class="ruby-identifier">$orig_dollar_quote</span>
17
+ 94: <span class="ruby-constant">GC</span>.<span class="ruby-identifier">start</span>
18
+ 95: <span class="ruby-constant">Dispatcher</span>.<span class="ruby-identifier">reset_application!</span>
19
+ 96: <span class="ruby-constant">ActionController</span><span class="ruby-operator">::</span><span class="ruby-constant">Routing</span><span class="ruby-operator">::</span><span class="ruby-constant">Routes</span>.<span class="ruby-identifier">reload</span>
20
+ 97: <span class="ruby-keyword kw">end</span>
21
+ 98: <span class="ruby-keyword kw">end</span></pre>
22
22
  </body>
23
23
  </html>
@@ -10,13 +10,13 @@
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 444</span>
14
- 444: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">pattern</span>, <span class="ruby-identifier">replacement</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
15
- 445: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">replacement</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">block</span>
16
- 446: <span class="ruby-ivar">@replacement</span> = <span class="ruby-identifier">pattern</span>
17
- 447: <span class="ruby-keyword kw">else</span>
18
- 448: <span class="ruby-ivar">@pattern</span>, <span class="ruby-ivar">@replacement</span>, <span class="ruby-ivar">@block</span> = <span class="ruby-identifier">pattern</span>, <span class="ruby-identifier">replacement</span>, <span class="ruby-identifier">block</span>
19
- 449: <span class="ruby-keyword kw">end</span>
20
- 450: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 433</span>
14
+ 433: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">pattern</span>, <span class="ruby-identifier">replacement</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
15
+ 434: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">replacement</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">block</span>
16
+ 435: <span class="ruby-ivar">@replacement</span> = <span class="ruby-identifier">pattern</span>
17
+ 436: <span class="ruby-keyword kw">else</span>
18
+ 437: <span class="ruby-ivar">@pattern</span>, <span class="ruby-ivar">@replacement</span>, <span class="ruby-ivar">@block</span> = <span class="ruby-identifier">pattern</span>, <span class="ruby-identifier">replacement</span>, <span class="ruby-identifier">block</span>
19
+ 438: <span class="ruby-keyword kw">end</span>
20
+ 439: <span class="ruby-keyword kw">end</span></pre>
21
21
  </body>
22
22
  </html>
@@ -10,18 +10,18 @@
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 453</span>
14
- 453: <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
- 454: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@pattern</span>
16
- 455: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">socket</span>.<span class="ruby-identifier">write</span>(<span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">REDIRECT</span> <span class="ruby-operator">%</span> <span class="ruby-ivar">@replacement</span>)
17
- 456: <span class="ruby-keyword kw">else</span>
18
- 457: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@block</span>
19
- 458: <span class="ruby-identifier">new_path</span> = <span class="ruby-identifier">request</span>.<span class="ruby-identifier">params</span>[<span class="ruby-value str">'REQUEST_URI'</span>].<span class="ruby-identifier">gsub</span>(<span class="ruby-ivar">@pattern</span>, <span class="ruby-operator">&amp;</span><span class="ruby-ivar">@block</span>)
20
- 459: <span class="ruby-keyword kw">else</span>
21
- 460: <span class="ruby-identifier">new_path</span> = <span class="ruby-identifier">request</span>.<span class="ruby-identifier">params</span>[<span class="ruby-value str">'REQUEST_URI'</span>].<span class="ruby-identifier">gsub</span>(<span class="ruby-ivar">@pattern</span>, <span class="ruby-ivar">@replacement</span>)
22
- 461: <span class="ruby-keyword kw">end</span>
23
- 462: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">socket</span>.<span class="ruby-identifier">write</span>(<span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">REDIRECT</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">new_path</span>)
24
- 463: <span class="ruby-keyword kw">end</span>
25
- 464: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 442</span>
14
+ 442: <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
+ 443: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@pattern</span>
16
+ 444: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">socket</span>.<span class="ruby-identifier">write</span>(<span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">REDIRECT</span> <span class="ruby-operator">%</span> <span class="ruby-ivar">@replacement</span>)
17
+ 445: <span class="ruby-keyword kw">else</span>
18
+ 446: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@block</span>
19
+ 447: <span class="ruby-identifier">new_path</span> = <span class="ruby-identifier">request</span>.<span class="ruby-identifier">params</span>[<span class="ruby-value str">'REQUEST_URI'</span>].<span class="ruby-identifier">gsub</span>(<span class="ruby-ivar">@pattern</span>, <span class="ruby-operator">&amp;</span><span class="ruby-ivar">@block</span>)
20
+ 448: <span class="ruby-keyword kw">else</span>
21
+ 449: <span class="ruby-identifier">new_path</span> = <span class="ruby-identifier">request</span>.<span class="ruby-identifier">params</span>[<span class="ruby-value str">'REQUEST_URI'</span>].<span class="ruby-identifier">gsub</span>(<span class="ruby-ivar">@pattern</span>, <span class="ruby-ivar">@replacement</span>)
22
+ 450: <span class="ruby-keyword kw">end</span>
23
+ 451: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">socket</span>.<span class="ruby-identifier">write</span>(<span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">REDIRECT</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">new_path</span>)
24
+ 452: <span class="ruby-keyword kw">end</span>
25
+ 453: <span class="ruby-keyword kw">end</span></pre>
26
26
  </body>
27
27
  </html>
@@ -10,15 +10,15 @@
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 339</span>
14
- 339: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">ops</span>={})
15
- 340: <span class="ruby-ivar">@sample_rate</span> = <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:sample_rate</span>] <span class="ruby-operator">||</span> <span class="ruby-value">300</span>
16
- 341:
17
- 342: <span class="ruby-ivar">@processors</span> = <span class="ruby-constant">Stats</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;processors&quot;</span>)
18
- 343: <span class="ruby-ivar">@reqsize</span> = <span class="ruby-constant">Stats</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;request Kb&quot;</span>)
19
- 344: <span class="ruby-ivar">@headcount</span> = <span class="ruby-constant">Stats</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;req param count&quot;</span>)
20
- 345: <span class="ruby-ivar">@respsize</span> = <span class="ruby-constant">Stats</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;response Kb&quot;</span>)
21
- 346: <span class="ruby-ivar">@interreq</span> = <span class="ruby-constant">Stats</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;inter-request time&quot;</span>)
22
- 347: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 328</span>
14
+ 328: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">ops</span>={})
15
+ 329: <span class="ruby-ivar">@sample_rate</span> = <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:sample_rate</span>] <span class="ruby-operator">||</span> <span class="ruby-value">300</span>
16
+ 330:
17
+ 331: <span class="ruby-ivar">@processors</span> = <span class="ruby-constant">Stats</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;processors&quot;</span>)
18
+ 332: <span class="ruby-ivar">@reqsize</span> = <span class="ruby-constant">Stats</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;request Kb&quot;</span>)
19
+ 333: <span class="ruby-ivar">@headcount</span> = <span class="ruby-constant">Stats</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;req param count&quot;</span>)
20
+ 334: <span class="ruby-ivar">@respsize</span> = <span class="ruby-constant">Stats</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;response Kb&quot;</span>)
21
+ 335: <span class="ruby-ivar">@interreq</span> = <span class="ruby-constant">Stats</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;inter-request time&quot;</span>)
22
+ 336: <span class="ruby-keyword kw">end</span></pre>
23
23
  </body>
24
24
  </html>
@@ -10,15 +10,15 @@
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 350</span>
14
- 350: <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
- 351: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rand</span>(<span class="ruby-ivar">@sample_rate</span>)<span class="ruby-operator">+</span><span class="ruby-value">1</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@sample_rate</span>
16
- 352: <span class="ruby-ivar">@processors</span>.<span class="ruby-identifier">sample</span>(<span class="ruby-identifier">listener</span>.<span class="ruby-identifier">workers</span>.<span class="ruby-identifier">list</span>.<span class="ruby-identifier">length</span>)
17
- 353: <span class="ruby-ivar">@headcount</span>.<span class="ruby-identifier">sample</span>(<span class="ruby-identifier">request</span>.<span class="ruby-identifier">params</span>.<span class="ruby-identifier">length</span>)
18
- 354: <span class="ruby-ivar">@reqsize</span>.<span class="ruby-identifier">sample</span>(<span class="ruby-identifier">request</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">/</span> <span class="ruby-value">1024.0</span>)
19
- 355: <span class="ruby-ivar">@respsize</span>.<span class="ruby-identifier">sample</span>((<span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">header</span>.<span class="ruby-identifier">out</span>.<span class="ruby-identifier">length</span>) <span class="ruby-operator">/</span> <span class="ruby-value">1024.0</span>)
20
- 356: <span class="ruby-keyword kw">end</span>
21
- 357: <span class="ruby-ivar">@interreq</span>.<span class="ruby-identifier">tick</span>
22
- 358: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 339</span>
14
+ 339: <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
+ 340: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rand</span>(<span class="ruby-ivar">@sample_rate</span>)<span class="ruby-operator">+</span><span class="ruby-value">1</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@sample_rate</span>
16
+ 341: <span class="ruby-ivar">@processors</span>.<span class="ruby-identifier">sample</span>(<span class="ruby-identifier">listener</span>.<span class="ruby-identifier">workers</span>.<span class="ruby-identifier">list</span>.<span class="ruby-identifier">length</span>)
17
+ 342: <span class="ruby-ivar">@headcount</span>.<span class="ruby-identifier">sample</span>(<span class="ruby-identifier">request</span>.<span class="ruby-identifier">params</span>.<span class="ruby-identifier">length</span>)
18
+ 343: <span class="ruby-ivar">@reqsize</span>.<span class="ruby-identifier">sample</span>(<span class="ruby-identifier">request</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">/</span> <span class="ruby-value">1024.0</span>)
19
+ 344: <span class="ruby-ivar">@respsize</span>.<span class="ruby-identifier">sample</span>((<span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">header</span>.<span class="ruby-identifier">out</span>.<span class="ruby-identifier">length</span>) <span class="ruby-operator">/</span> <span class="ruby-value">1024.0</span>)
20
+ 345: <span class="ruby-keyword kw">end</span>
21
+ 346: <span class="ruby-ivar">@interreq</span>.<span class="ruby-identifier">tick</span>
22
+ 347: <span class="ruby-keyword kw">end</span></pre>
23
23
  </body>
24
24
  </html>
@@ -10,9 +10,9 @@
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 360</span>
14
- 360: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump</span>
15
- 361: <span class="ruby-node">&quot;#{@processors.to_s}\n#{@reqsize.to_s}\n#{@headcount.to_s}\n#{@respsize.to_s}\n#{@interreq.to_s}&quot;</span>
16
- 362: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 349</span>
14
+ 349: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dump</span>
15
+ 350: <span class="ruby-node">&quot;#{@processors.to_s}\n#{@reqsize.to_s}\n#{@headcount.to_s}\n#{@respsize.to_s}\n#{@interreq.to_s}&quot;</span>
16
+ 351: <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>