mongrel 0.3.13.4 → 1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (256) hide show
  1. data/README +1 -75
  2. data/Rakefile +14 -14
  3. data/bin/mongrel_rails +35 -23
  4. data/doc/rdoc/classes/IO.html +12 -12
  5. data/doc/rdoc/classes/IO.src/{M000001.html → M000003.html} +0 -0
  6. data/doc/rdoc/classes/IO.src/{M000002.html → M000004.html} +0 -0
  7. data/doc/rdoc/classes/Kernel.html +11 -11
  8. data/doc/rdoc/classes/Kernel.src/{M000010.html → M000012.html} +0 -0
  9. data/doc/rdoc/classes/Kernel.src/{M000011.html → M000013.html} +0 -0
  10. data/doc/rdoc/classes/Mongrel.html +3 -3
  11. data/doc/rdoc/classes/Mongrel/CGIWrapper.html +77 -69
  12. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000115.html +12 -19
  13. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000116.html +34 -12
  14. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000117.html +21 -5
  15. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000118.html +19 -5
  16. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000119.html +12 -5
  17. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000120.html +5 -6
  18. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000121.html +18 -0
  19. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000122.html +18 -0
  20. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000123.html +19 -0
  21. data/doc/rdoc/classes/Mongrel/Camping.html +8 -8
  22. data/doc/rdoc/classes/Mongrel/Camping.src/M000041.html +22 -0
  23. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.html +31 -12
  24. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000042.html +20 -0
  25. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000043.html +58 -0
  26. data/doc/rdoc/classes/Mongrel/Command/Base.html +75 -73
  27. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000018.html +11 -5
  28. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000019.html +29 -5
  29. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000020.html +5 -5
  30. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000021.html +5 -5
  31. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000022.html +5 -9
  32. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000023.html +5 -5
  33. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000024.html +9 -5
  34. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000025.html +5 -5
  35. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000026.html +5 -11
  36. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000027.html +5 -11
  37. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000028.html +11 -5
  38. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000029.html +24 -0
  39. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000030.html +18 -0
  40. data/doc/rdoc/classes/Mongrel/Command/Registry.html +20 -20
  41. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000031.html +7 -45
  42. data/doc/rdoc/classes/Mongrel/Command/Registry.src/{M000030.html → M000032.html} +0 -0
  43. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000033.html +58 -0
  44. data/doc/rdoc/classes/Mongrel/Configurator.html +163 -140
  45. data/doc/rdoc/classes/Mongrel/Configurator.src/M000093.html +14 -8
  46. data/doc/rdoc/classes/Mongrel/Configurator.src/M000094.html +18 -7
  47. data/doc/rdoc/classes/Mongrel/Configurator.src/M000095.html +5 -10
  48. data/doc/rdoc/classes/Mongrel/Configurator.src/M000096.html +8 -5
  49. data/doc/rdoc/classes/Mongrel/Configurator.src/M000097.html +7 -25
  50. data/doc/rdoc/classes/Mongrel/Configurator.src/M000098.html +10 -6
  51. data/doc/rdoc/classes/Mongrel/Configurator.src/M000099.html +5 -26
  52. data/doc/rdoc/classes/Mongrel/Configurator.src/M000100.html +25 -20
  53. data/doc/rdoc/classes/Mongrel/Configurator.src/M000101.html +6 -5
  54. data/doc/rdoc/classes/Mongrel/Configurator.src/M000102.html +26 -11
  55. data/doc/rdoc/classes/Mongrel/Configurator.src/M000103.html +20 -6
  56. data/doc/rdoc/classes/Mongrel/Configurator.src/M000104.html +5 -5
  57. data/doc/rdoc/classes/Mongrel/Configurator.src/M000105.html +11 -9
  58. data/doc/rdoc/classes/Mongrel/Configurator.src/M000106.html +6 -9
  59. data/doc/rdoc/classes/Mongrel/Configurator.src/M000107.html +5 -5
  60. data/doc/rdoc/classes/Mongrel/Configurator.src/M000108.html +9 -21
  61. data/doc/rdoc/classes/Mongrel/Configurator.src/M000109.html +9 -5
  62. data/doc/rdoc/classes/Mongrel/Configurator.src/M000110.html +5 -23
  63. data/doc/rdoc/classes/Mongrel/Configurator.src/M000111.html +21 -5
  64. data/doc/rdoc/classes/Mongrel/Configurator.src/M000112.html +18 -0
  65. data/doc/rdoc/classes/Mongrel/Configurator.src/M000113.html +36 -0
  66. data/doc/rdoc/classes/Mongrel/Configurator.src/M000114.html +18 -0
  67. data/doc/rdoc/classes/Mongrel/Const.html +8 -9
  68. data/doc/rdoc/classes/Mongrel/DeflateFilter.html +19 -12
  69. data/doc/rdoc/classes/Mongrel/DeflateFilter.src/{M000121.html → M000124.html} +5 -5
  70. data/doc/rdoc/classes/Mongrel/DeflateFilter.src/{M000122.html → M000125.html} +9 -14
  71. data/doc/rdoc/classes/Mongrel/DirHandler.html +43 -43
  72. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000051.html +8 -25
  73. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000052.html +29 -50
  74. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000053.html +25 -26
  75. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000054.html +52 -5
  76. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000055.html +39 -0
  77. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000056.html +18 -0
  78. data/doc/rdoc/classes/Mongrel/Error404Handler.html +11 -11
  79. data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000123.html → M000126.html} +4 -4
  80. data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000124.html → M000127.html} +4 -4
  81. data/doc/rdoc/classes/Mongrel/HeaderOut.html +15 -10
  82. data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000066.html +21 -0
  83. data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000067.html +21 -0
  84. data/doc/rdoc/classes/Mongrel/HttpHandler.html +25 -23
  85. data/doc/rdoc/classes/Mongrel/HttpHandler.src/M000072.html +4 -4
  86. data/doc/rdoc/classes/Mongrel/HttpHandler.src/{M000071.html → M000073.html} +3 -3
  87. data/doc/rdoc/classes/Mongrel/{HttpHandlerPlugin.src/M000012.html → HttpHandler.src/M000074.html} +4 -4
  88. data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.html +22 -21
  89. data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000014.html +4 -6
  90. data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000015.html +4 -4
  91. data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000016.html +19 -0
  92. data/doc/rdoc/classes/Mongrel/{HttpHandler.src/M000070.html → HttpHandlerPlugin.src/M000017.html} +4 -4
  93. data/doc/rdoc/classes/Mongrel/HttpParser.html +44 -42
  94. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000044.html +6 -7
  95. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000045.html +7 -37
  96. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000046.html +7 -5
  97. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000047.html +37 -5
  98. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000048.html +5 -6
  99. data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000042.html → M000049.html} +5 -6
  100. data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000043.html → M000050.html} +6 -7
  101. data/doc/rdoc/classes/Mongrel/HttpRequest.html +37 -40
  102. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000133.html +37 -7
  103. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000134.html +28 -7
  104. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000135.html +16 -19
  105. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000136.html +20 -0
  106. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000137.html +20 -0
  107. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000138.html +32 -0
  108. data/doc/rdoc/classes/Mongrel/HttpResponse.html +95 -85
  109. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000075.html +12 -13
  110. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000076.html +7 -9
  111. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000077.html +13 -9
  112. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000078.html +9 -9
  113. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000079.html +9 -18
  114. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000080.html +9 -8
  115. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000081.html +18 -7
  116. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000082.html +8 -7
  117. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000083.html +7 -7
  118. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000084.html +7 -5
  119. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000085.html +20 -0
  120. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000086.html +18 -0
  121. data/doc/rdoc/classes/Mongrel/HttpServer.html +59 -63
  122. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000057.html +12 -19
  123. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000058.html +87 -8
  124. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000059.html +19 -9
  125. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000060.html +8 -49
  126. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000061.html +16 -21
  127. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000062.html +52 -5
  128. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000063.html +21 -9
  129. data/doc/rdoc/classes/Mongrel/{HeaderOut.src → HttpServer.src}/M000064.html +5 -5
  130. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000065.html +22 -0
  131. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.html +27 -25
  132. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000034.html +24 -13
  133. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/{M000033.html → M000035.html} +11 -11
  134. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000036.html +26 -0
  135. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.html +24 -26
  136. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000037.html +10 -8
  137. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000038.html +43 -12
  138. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000039.html +20 -0
  139. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000040.html +25 -0
  140. data/doc/rdoc/classes/Mongrel/RedirectHandler.html +10 -10
  141. data/doc/rdoc/classes/Mongrel/RedirectHandler.src/{M000128.html → M000131.html} +8 -8
  142. data/doc/rdoc/classes/Mongrel/RedirectHandler.src/{M000129.html → M000132.html} +13 -13
  143. data/doc/rdoc/classes/Mongrel/StatisticsFilter.html +20 -20
  144. data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000125.html → M000128.html} +10 -10
  145. data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000126.html → M000129.html} +10 -10
  146. data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000127.html → M000130.html} +4 -4
  147. data/doc/rdoc/classes/Mongrel/Stats.html +43 -42
  148. data/doc/rdoc/classes/Mongrel/Stats.src/M000139.html +6 -5
  149. data/doc/rdoc/classes/Mongrel/Stats.src/M000140.html +10 -5
  150. data/doc/rdoc/classes/Mongrel/Stats.src/M000141.html +13 -5
  151. data/doc/rdoc/classes/Mongrel/Stats.src/M000142.html +5 -10
  152. data/doc/rdoc/classes/Mongrel/Stats.src/M000143.html +5 -7
  153. data/doc/rdoc/classes/Mongrel/Stats.src/{M000136.html → M000144.html} +5 -6
  154. data/doc/rdoc/classes/Mongrel/Stats.src/M000145.html +23 -0
  155. data/doc/rdoc/classes/Mongrel/Stats.src/M000146.html +20 -0
  156. data/doc/rdoc/classes/Mongrel/StatusHandler.html +21 -21
  157. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000068.html +5 -29
  158. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000069.html +11 -7
  159. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000070.html +42 -0
  160. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000071.html +20 -0
  161. data/doc/rdoc/classes/Mongrel/URIClassifier.html +58 -55
  162. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000087.html +5 -26
  163. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000088.html +5 -38
  164. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000089.html +18 -15
  165. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000090.html +25 -57
  166. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000091.html +36 -0
  167. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000092.html +83 -0
  168. data/doc/rdoc/classes/MongrelDbg.html +25 -25
  169. data/doc/rdoc/classes/MongrelDbg.src/M000007.html +11 -9
  170. data/doc/rdoc/classes/MongrelDbg.src/M000008.html +7 -8
  171. data/doc/rdoc/classes/MongrelDbg.src/M000009.html +9 -5
  172. data/doc/rdoc/classes/MongrelDbg.src/M000010.html +21 -0
  173. data/doc/rdoc/classes/MongrelDbg.src/M000011.html +18 -0
  174. data/doc/rdoc/classes/{Sync.html → Mutex.html} +50 -19
  175. data/doc/rdoc/classes/Mutex.src/M000001.html +24 -0
  176. data/doc/rdoc/classes/Mutex.src/M000002.html +32 -0
  177. data/doc/rdoc/classes/RequestLog/Access.html +5 -5
  178. data/doc/rdoc/classes/RequestLog/Access.src/{M000144.html → M000147.html} +0 -0
  179. data/doc/rdoc/classes/RequestLog/Files.html +5 -5
  180. data/doc/rdoc/classes/RequestLog/Files.src/{M000145.html → M000148.html} +0 -0
  181. data/doc/rdoc/classes/RequestLog/Objects.html +5 -5
  182. data/doc/rdoc/classes/RequestLog/Objects.src/{M000147.html → M000150.html} +0 -0
  183. data/doc/rdoc/classes/RequestLog/Params.html +5 -5
  184. data/doc/rdoc/classes/RequestLog/Params.src/{M000148.html → M000151.html} +0 -0
  185. data/doc/rdoc/classes/RequestLog/Threads.html +5 -5
  186. data/doc/rdoc/classes/RequestLog/Threads.src/{M000146.html → M000149.html} +0 -0
  187. data/doc/rdoc/classes/TCPServer.html +10 -10
  188. data/doc/rdoc/classes/TCPServer.src/{M000003.html → M000005.html} +0 -0
  189. data/doc/rdoc/created.rid +1 -1
  190. data/doc/rdoc/files/COPYING.html +1 -1
  191. data/doc/rdoc/files/LICENSE.html +1 -1
  192. data/doc/rdoc/files/README.html +11 -100
  193. data/doc/rdoc/files/ext/http11/http11_c.html +1 -1
  194. data/doc/rdoc/files/lib/mongrel/camping_rb.html +2 -2
  195. data/doc/rdoc/files/lib/mongrel/cgi_rb.html +2 -2
  196. data/doc/rdoc/files/lib/mongrel/command_rb.html +2 -2
  197. data/doc/rdoc/files/lib/mongrel/configurator_rb.html +1 -1
  198. data/doc/rdoc/files/lib/mongrel/debug_rb.html +2 -2
  199. data/doc/rdoc/files/lib/mongrel/handlers_rb.html +3 -2
  200. data/doc/rdoc/files/lib/mongrel/init_rb.html +2 -2
  201. data/doc/rdoc/files/lib/mongrel/rails_rb.html +2 -3
  202. data/doc/rdoc/files/lib/mongrel/stats_rb.html +2 -2
  203. data/doc/rdoc/files/lib/mongrel/tcphack_rb.html +2 -2
  204. data/doc/rdoc/files/lib/mongrel_rb.html +5 -3
  205. data/doc/rdoc/files/lib/mutex_fix_rb.html +108 -0
  206. data/doc/rdoc/fr_class_index.html +1 -1
  207. data/doc/rdoc/fr_file_index.html +1 -0
  208. data/doc/rdoc/fr_method_index.html +151 -148
  209. data/ext/http11/http11.c +2 -2
  210. data/lib/mongrel.rb +85 -38
  211. data/lib/mongrel/camping.rb +17 -4
  212. data/lib/mongrel/configurator.rb +11 -7
  213. data/lib/mongrel/handlers.rb +30 -27
  214. data/lib/mongrel/mime_types.yml +615 -0
  215. data/lib/mongrel/rails.rb +21 -28
  216. data/lib/mutex_fix.rb +34 -0
  217. data/test/test_handlers.rb +16 -4
  218. data/test/test_http11.rb +8 -0
  219. data/test/test_request_progress.rb +45 -2
  220. data/test/test_response.rb +31 -0
  221. metadata +95 -71
  222. data/bin/mongrel_rails_service +0 -246
  223. data/bin/mongrel_rails_svc +0 -307
  224. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000112.html +0 -25
  225. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000113.html +0 -47
  226. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000114.html +0 -34
  227. data/doc/rdoc/classes/Mongrel/Camping.src/M000039.html +0 -22
  228. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000040.html +0 -18
  229. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000041.html +0 -51
  230. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000016.html +0 -24
  231. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000017.html +0 -42
  232. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000029.html +0 -20
  233. data/doc/rdoc/classes/Mongrel/Configurator.src/M000091.html +0 -27
  234. data/doc/rdoc/classes/Mongrel/Configurator.src/M000092.html +0 -31
  235. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000049.html +0 -21
  236. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000050.html +0 -43
  237. data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000065.html +0 -18
  238. data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000013.html +0 -17
  239. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000130.html +0 -47
  240. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000131.html +0 -37
  241. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000132.html +0 -29
  242. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000073.html +0 -25
  243. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000074.html +0 -20
  244. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000055.html +0 -25
  245. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000056.html +0 -91
  246. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000032.html +0 -37
  247. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000035.html +0 -23
  248. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000036.html +0 -54
  249. data/doc/rdoc/classes/Mongrel/Stats.src/M000137.html +0 -23
  250. data/doc/rdoc/classes/Mongrel/Stats.src/M000138.html +0 -26
  251. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000066.html +0 -18
  252. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000067.html +0 -24
  253. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000085.html +0 -18
  254. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000086.html +0 -18
  255. data/doc/rdoc/classes/MongrelDbg.src/M000005.html +0 -24
  256. data/doc/rdoc/classes/MongrelDbg.src/M000006.html +0 -20
data/README CHANGED
@@ -9,27 +9,7 @@ What makes Mongrel so fast is the careful use of a C extension to provide fast
9
9
  HTTP 1.1 protocol parsing and fast URI lookup. This combination makes the server
10
10
  scream without too many portability issues.
11
11
 
12
- == Status
13
-
14
- Mongrel 0.3.9 now supports a fancy RubyGems based plugin system called GemPlugin.
15
- It uses the basic machinery of RubyGems to implement dynamically loaded plugins
16
- based on dependencies. Writing a plugin is pretty easy, but right now it's
17
- not as well documented as it should be. There is a simple example plugin
18
- for adding a status command to your mongrel. Just do:
19
-
20
- > gem install mongrel_status
21
-
22
- And you'll then get a new status command. Then just do:
23
-
24
- > cd myrailsapp
25
- > mongrel_rails start -d
26
- > mongrel_rails status
27
-
28
- And it'll print out the PID your Rails app is running under.
29
-
30
- The GemPlugin project is a sub-project of Mongrel, but it's licensed under
31
- the Ruby license and is usable outside Mongrel
32
-
12
+ You can view http://mongrel.rubyforge.org for more information.
33
13
 
34
14
  == Quick Start
35
15
 
@@ -60,39 +40,6 @@ changing to a different directory, adding more MIME types, and setting processor
60
40
  threads and timeouts.
61
41
 
62
42
 
63
- === Win32 Service Support
64
-
65
- Mongrel now has support for running as a Win32 service right out of the
66
- box. The support is still rough but works well enough that we decided
67
- to release it. You can thank Luis Lavena for working on this and making
68
- it so nice.
69
-
70
- After you do the gem install, find a Rails application you want to run
71
- and do:
72
-
73
- $ mongrel_rails_service install -n myapp \
74
- -r c:\my\path\to\myapp -p 4000 -e production
75
- $ mongrel_rails_service start -n myapp
76
-
77
- Now hit the port and poof, works.
78
-
79
- Stopping a service is simple:
80
-
81
- $ mongrel_rails_service stop -n myapp
82
-
83
- If you run into an app that's not running right, my suggestion is to run it with
84
- the regular mongrel_rails runner:
85
-
86
- $ cd c:\my\path\to\myapp
87
- $ mongrel_rails start -p 4500
88
-
89
- Since that will spit out error messages and stuff to the console. *Use CTRL-Pause/Break to stop.*
90
-
91
- Best thing about the win32 support is that you can simply use the Windows Services
92
- in Control Panel->Admin Tools to work with it. You can also install the same
93
- Rails app as different installs. For example I've got myapp_dev, and myapp_prod and
94
- just start/stop which one I want to work with.
95
-
96
43
  == Install
97
44
 
98
45
  It doesn't explicitly require Camping, but if you want to run the examples/camping/
@@ -104,7 +51,6 @@ who can build it for you.
104
51
 
105
52
  Finally, the source includes a setup.rb for those who hate RubyGems.
106
53
 
107
-
108
54
  == Usage
109
55
 
110
56
  The examples/simpletest.rb file has the following code as the simplest
@@ -135,26 +81,6 @@ This also shows the DirHandler with directory listings. This is still
135
81
  rough but it should work for basic hosting. *File extension to mime
136
82
  type mapping is missing though.*
137
83
 
138
-
139
- == Speed
140
-
141
- Like previous releases 0.3.1 continues the trend of making things
142
- as fast as possible. It currently might be a little slower than
143
- other releases but should hold up pretty good against at least
144
- WEBrick (especially when running Rails).
145
-
146
- As before you can control the number of processor threads (and thus
147
- ActiveRecord database connections) with:
148
-
149
- h = Mongrel::HttpServer.new("0.0.0.0", "3000", 40)
150
-
151
- Which will make 40 thread processors. Right now the optimal setting is up in
152
- the air, but 20 seemed to be about the sweet spot on my systems. The
153
- limited processors also means that you can use ActiveRecord as-is and it will
154
- create a matching database connection for each processor thread. More on
155
- this in future releases.
156
-
157
-
158
84
  == Contact
159
85
 
160
86
  E-mail zedshaw at zedshaw.com and I'll help. Comments about the API are welcome.
data/Rakefile CHANGED
@@ -33,15 +33,15 @@ task :ragel do
33
33
  end
34
34
 
35
35
  task :site_webgen do
36
- sh %{pushd doc/site; webgen; scp -r output/* #{ENV['SSH_USER']}@rubyforge.org:/var/www/gforge-projects/mongrel/; popd }
36
+ sh %{pushd doc/site; webgen; ruby atom.rb > output/feed.atom; rsync -azv output/* rubyforge.org:/var/www/gforge-projects/mongrel/; popd }
37
37
  end
38
38
 
39
39
  task :site_rdoc do
40
- sh %{ scp -r doc/rdoc/* #{ENV['SSH_USER']}@rubyforge.org:/var/www/gforge-projects/mongrel/rdoc/ }
40
+ sh %{ rsync -azv doc/rdoc/* rubyforge.org:/var/www/gforge-projects/mongrel/rdoc/ }
41
41
  end
42
42
 
43
43
  task :site_coverage => [:rcov] do
44
- sh %{ scp -r test/coverage/* #{ENV['SSH_USER']}@rubyforge.org:/var/www/gforge-projects/mongrel/coverage/ }
44
+ sh %{ rsync -azv test/coverage/* rubyforge.org:/var/www/gforge-projects/mongrel/coverage/ }
45
45
  end
46
46
 
47
47
  task :site_projects_rdoc do
@@ -53,35 +53,34 @@ task :site => [:site_webgen, :site_rdoc, :site_coverage, :site_projects_rdoc]
53
53
  setup_extension("http11", "http11")
54
54
 
55
55
  name="mongrel"
56
- version="0.3.13.4"
56
+ version="1.0"
57
57
 
58
58
  setup_gem(name, version) do |spec|
59
- spec.summary = "A small fast HTTP library and server that runs Rails, Camping, and Nitro apps."
59
+ spec.summary = "A small fast HTTP library and server that runs Rails, Camping, Nitro and Iowa apps."
60
60
  spec.description = spec.summary
61
61
  spec.test_files = Dir.glob('test/test_*.rb')
62
62
  spec.author="Zed A. Shaw"
63
63
  spec.executables=['mongrel_rails']
64
- spec.files += %w(ext/http11/MANIFEST README Rakefile setup.rb)
64
+ spec.files += %w(ext/http11/MANIFEST README Rakefile setup.rb lib/mongrel/mime_types.yml)
65
65
 
66
66
  spec.required_ruby_version = '>= 1.8.4'
67
67
 
68
68
  if RUBY_PLATFORM =~ /mswin/
69
- Dir.chdir "projects/mongrel_service" do
70
- `rake.cmd install`
71
- end
72
- spec.files += ['ext/http11/http11.so']
73
69
  spec.files += ['lib/http11.so']
74
70
  spec.extensions.clear
75
71
  spec.platform = Gem::Platform::WIN32
76
72
  else
77
- spec.add_dependency('daemons', '>= 0.4.2')
73
+ spec.add_dependency('daemons', '>= 1.0.3')
74
+ spec.add_dependency('fastthread', '>= 0.6.2')
78
75
  end
79
76
 
80
- spec.add_dependency('gem_plugin', '>= 0.2.1')
77
+ spec.add_dependency('gem_plugin', '>= 0.2.2')
78
+ spec.add_dependency('cgi_multipart_eof_fix', '>= 1.0.0')
81
79
  end
82
80
 
83
81
  task :install do
84
82
  sub_project("gem_plugin", :install)
83
+ sub_project("fastthread", :install)
85
84
  sh %{rake package}
86
85
  sh %{gem install pkg/mongrel-#{version}}
87
86
  sub_project("mongrel_status", :install)
@@ -99,6 +98,7 @@ task :uninstall => [:clean] do
99
98
  sub_project("mongrel_console", :uninstall)
100
99
  sh %{gem uninstall mongrel}
101
100
  sub_project("gem_plugin", :uninstall)
101
+ sub_project("fastthread", :uninstall)
102
102
  if RUBY_PLATFORM =~ /mswin/
103
103
  sub_project("mongrel_service", :install)
104
104
  end
@@ -112,6 +112,6 @@ task :gem_source do
112
112
  FileList["pkg/*.tgz"].each {|tgz| rm tgz }
113
113
  rm_rf "pkg/#{name}-#{version}"
114
114
 
115
- sh %{ generate_yaml_index.rb -d pkg }
116
- sh %{ scp -r pkg/* #{ENV['SSH_USER']}@rubyforge.org:/var/www/gforge-projects/mongrel/releases/ }
115
+ sh %{ index_gem_repository.rb -d pkg }
116
+ sh %{ scp -r ChangeLog pkg/* rubyforge.org:/var/www/gforge-projects/mongrel/releases/ }
117
117
  end
@@ -9,6 +9,7 @@ require 'yaml'
9
9
  require 'mongrel'
10
10
  require 'mongrel/rails'
11
11
  require 'etc'
12
+ require 'cgi_multipart_eof_fix' rescue nil
12
13
 
13
14
  module Mongrel
14
15
  class Start < GemPlugin::Plugin "/commands"
@@ -17,7 +18,7 @@ module Mongrel
17
18
  def configure
18
19
  options [
19
20
  ["-e", "--environment ENV", "Rails environment to run as", :@environment, ENV['RAILS_ENV'] || "development"],
20
- ["-d", "--daemonize", "Whether to run in the background or not", :@daemon, false],
21
+ ["-d", "--daemonize", "Run daemonized in the background", :@daemon, false],
21
22
  ['-p', '--port PORT', "Which port to bind to", :@port, 3000],
22
23
  ['-a', '--address ADDR', "Address to bind to", :@address, "0.0.0.0"],
23
24
  ['-l', '--log FILE', "Where to write log messages", :@log_file, "log/mongrel.log"],
@@ -29,8 +30,8 @@ module Mongrel
29
30
  ['-r', '--root PATH', "Set the document root (default 'public')", :@docroot, "public"],
30
31
  ['-B', '--debug', "Enable debugging mode", :@debug, false],
31
32
  ['-C', '--config PATH', "Use a config file", :@config_file, nil],
32
- ['-S', '--script PATH', "Load the given file as an extra config script.", :@config_script, nil],
33
- ['-G', '--generate CONFIG', "Generate a config file for -C", :@generate, nil],
33
+ ['-S', '--script PATH', "Load the given file as an extra config script", :@config_script, nil],
34
+ ['-G', '--generate PATH', "Generate a config file for use with -C", :@generate, nil],
34
35
  ['', '--user USER', "User to run as", :@user, nil],
35
36
  ['', '--group GROUP', "Group to run as", :@group, nil],
36
37
  ['', '--prefix PATH', "URL prefix for Rails app", :@prefix, nil]
@@ -41,7 +42,7 @@ module Mongrel
41
42
  @cwd = File.expand_path(@cwd)
42
43
  valid_dir? @cwd, "Invalid path to change to during daemon mode: #@cwd"
43
44
 
44
- # change there to start, then we'll have to come back after daemonize
45
+ # Change there to start, then we'll have to come back after daemonize
45
46
  Dir.chdir(@cwd)
46
47
 
47
48
  valid?(@prefix[0].chr == "/" && @prefix[-1].chr != "/", "Prefix must begin with / and not end in /") if @prefix
@@ -57,10 +58,8 @@ module Mongrel
57
58
  return @valid
58
59
  end
59
60
 
60
-
61
61
  def run
62
-
63
- # command line setting override config file settings
62
+ # Config file settings will override command line settings
64
63
  settings = { :host => @address, :port => @port, :cwd => @cwd,
65
64
  :log_file => @log_file, :pid_file => @pid_file, :environment => @environment,
66
65
  :docroot => @docroot, :mime_map => @mime_map, :daemon => @daemon,
@@ -70,22 +69,23 @@ module Mongrel
70
69
  }
71
70
 
72
71
  if @generate
73
- STDERR.puts "** Writing config to #@generate"
72
+ STDERR.puts "** Writing config to \"#@generate\"."
74
73
  open(@generate, "w") {|f| f.write(settings.to_yaml) }
75
- STDERR.puts "## Exiting. Re-run without -G and WITH -C using your new config file."
74
+ STDERR.puts "** Finished. Run \"mongrel_rails -C #@generate\" to use the config file."
76
75
  exit 0
77
76
  end
78
77
 
79
78
  if @config_file
80
- conf = YAML.load_file(@config_file)
81
- settings = settings.merge! conf
79
+ settings.merge! YAML.load_file(@config_file)
82
80
  STDERR.puts "** Loading settings from #{@config_file} (they override command line)." unless settings[:daemon]
83
81
  end
84
82
 
85
83
  config = Mongrel::Rails::RailsConfigurator.new(settings) do
86
84
  if defaults[:daemon]
87
85
  if File.exist? defaults[:pid_file]
88
- log "!!! PID file #{defaults[:pid_file]} already exists. Mongrel could be running already. Check your #{defaults[:log_file]} for errors."
86
+ log "!!! PID file #{defaults[:pid_file]} already exists. Mongrel could be running already. Check your #{defaults[:log_file]} for errors."
87
+ log "!!! Exiting with error. You must stop mongrel and clear the .pid before I'll attempt a start."
88
+ exit 1
89
89
  end
90
90
 
91
91
  daemonize
@@ -103,7 +103,7 @@ module Mongrel
103
103
  end
104
104
 
105
105
  if defaults[:debug]
106
- log "Installing debugging prefixed filters. Look in log/mongrel_debug for the files."
106
+ log "Installing debugging prefixed filters. Look in log/mongrel_debug for the files."
107
107
  debug "/"
108
108
  end
109
109
 
@@ -139,7 +139,15 @@ module Mongrel
139
139
  if RUBY_PLATFORM !~ /mswin/
140
140
  cmd = "ruby #{__FILE__} start #{original_args.join(' ')}"
141
141
  config.log "Restarting with arguments: #{cmd}"
142
- exec cmd
142
+ config.stop
143
+ config.remove_pid_file
144
+
145
+ if config.defaults[:daemon]
146
+ system cmd
147
+ else
148
+ STDERR.puts "Can't restart unless in daemon mode."
149
+ exit 1
150
+ end
143
151
  else
144
152
  config.log "Win32 does not support restarts. Exiting."
145
153
  end
@@ -165,9 +173,10 @@ module Mongrel
165
173
 
166
174
  def configure
167
175
  options [
168
- ['-c', '--chdir PATH', "Change to dir before starting (will be expanded)", :@cwd, "."],
169
- ['-f', '--force', "Force the shutdown.", :@force, false],
170
- ['-P', '--pid FILE', "Where the PID file is located", :@pid_file, "log/mongrel.pid"]
176
+ ['-c', '--chdir PATH', "Change to dir before starting (will be expanded).", :@cwd, "."],
177
+ ['-f', '--force', "Force the shutdown (kill -9).", :@force, false],
178
+ ['-w', '--wait SECONDS', "Wait SECONDS before forcing shutdown", :@wait, "0"],
179
+ ['-P', '--pid FILE', "Where the PID file is located.", :@pid_file, "log/mongrel.pid"]
171
180
  ]
172
181
  end
173
182
 
@@ -177,14 +186,18 @@ module Mongrel
177
186
 
178
187
  Dir.chdir @cwd
179
188
 
180
- valid_exists? @pid_file, "PID file #@pid_file does not exist. Not running?"
189
+ valid_exists? @pid_file, "PID file #@pid_file does not exist. Not running?"
181
190
  return @valid
182
191
  end
183
192
 
184
-
185
193
  def run
186
194
  if @force
187
- Mongrel::send_signal("KILL", @pid_file)
195
+ @wait.to_i.times do |waiting|
196
+ exit(0) if not File.exist? @pid_file
197
+ sleep 1
198
+ end
199
+
200
+ Mongrel::send_signal("KILL", @pid_file) if File.exist? @pid_file
188
201
  else
189
202
  Mongrel::send_signal("TERM", @pid_file)
190
203
  end
@@ -192,7 +205,6 @@ module Mongrel
192
205
  end
193
206
 
194
207
 
195
-
196
208
  class Restart < GemPlugin::Plugin "/commands"
197
209
  include Mongrel::Command::Base
198
210
 
@@ -210,11 +222,10 @@ module Mongrel
210
222
 
211
223
  Dir.chdir @cwd
212
224
 
213
- valid_exists? @pid_file, "PID file #@pid_file does not exist. Not running?"
225
+ valid_exists? @pid_file, "PID file #@pid_file does not exist. Not running?"
214
226
  return @valid
215
227
  end
216
228
 
217
-
218
229
  def run
219
230
  if @soft
220
231
  Mongrel::send_signal("HUP", @pid_file)
@@ -228,6 +239,7 @@ end
228
239
 
229
240
  GemPlugin::Manager.instance.load "mongrel" => GemPlugin::INCLUDE, "rails" => GemPlugin::EXCLUDE
230
241
 
242
+
231
243
  if not Mongrel::Command::Registry.instance.run ARGV
232
244
  exit 1
233
245
  end
@@ -86,8 +86,8 @@
86
86
  <h3 class="section-bar">Methods</h3>
87
87
 
88
88
  <div class="name-list">
89
- <a href="#M000002">close</a>&nbsp;&nbsp;
90
- <a href="#M000001">open</a>&nbsp;&nbsp;
89
+ <a href="#M000004">close</a>&nbsp;&nbsp;
90
+ <a href="#M000003">open</a>&nbsp;&nbsp;
91
91
  </div>
92
92
  </div>
93
93
 
@@ -107,12 +107,12 @@
107
107
  <table summary="aliases">
108
108
  <tr class="top-aligned-row context-row">
109
109
  <td class="context-item-name">open</td>
110
- <td>-></td>
110
+ <td>-&gt;</td>
111
111
  <td class="context-item-value">orig_open</td>
112
112
  </tr>
113
113
  <tr class="top-aligned-row context-row">
114
114
  <td class="context-item-name">close</td>
115
- <td>-></td>
115
+ <td>-&gt;</td>
116
116
  <td class="context-item-value">orig_close</td>
117
117
  </tr>
118
118
  </table>
@@ -127,12 +127,12 @@
127
127
  <div id="methods">
128
128
  <h3 class="section-bar">Public Instance methods</h3>
129
129
 
130
- <div id="method-M000002" class="method-detail">
131
- <a name="M000002"></a>
130
+ <div id="method-M000004" class="method-detail">
131
+ <a name="M000004"></a>
132
132
 
133
133
  <div class="method-heading">
134
- <a href="IO.src/M000002.html" target="Code" class="method-signature"
135
- onclick="popupCode('IO.src/M000002.html');return false;">
134
+ <a href="IO.src/M000004.html" target="Code" class="method-signature"
135
+ onclick="popupCode('IO.src/M000004.html');return false;">
136
136
  <span class="method-name">close</span><span class="method-args">(*arg,&amp;blk)</span>
137
137
  </a>
138
138
  </div>
@@ -141,12 +141,12 @@
141
141
  </div>
142
142
  </div>
143
143
 
144
- <div id="method-M000001" class="method-detail">
145
- <a name="M000001"></a>
144
+ <div id="method-M000003" class="method-detail">
145
+ <a name="M000003"></a>
146
146
 
147
147
  <div class="method-heading">
148
- <a href="IO.src/M000001.html" target="Code" class="method-signature"
149
- onclick="popupCode('IO.src/M000001.html');return false;">
148
+ <a href="IO.src/M000003.html" target="Code" class="method-signature"
149
+ onclick="popupCode('IO.src/M000003.html');return false;">
150
150
  <span class="method-name">open</span><span class="method-args">(*arg, &amp;blk)</span>
151
151
  </a>
152
152
  </div>
@@ -80,8 +80,8 @@
80
80
  <h3 class="section-bar">Methods</h3>
81
81
 
82
82
  <div class="name-list">
83
- <a href="#M000011">log_open_files</a>&nbsp;&nbsp;
84
- <a href="#M000010">open</a>&nbsp;&nbsp;
83
+ <a href="#M000013">log_open_files</a>&nbsp;&nbsp;
84
+ <a href="#M000012">open</a>&nbsp;&nbsp;
85
85
  </div>
86
86
  </div>
87
87
 
@@ -101,7 +101,7 @@
101
101
  <table summary="aliases">
102
102
  <tr class="top-aligned-row context-row">
103
103
  <td class="context-item-name">open</td>
104
- <td>-></td>
104
+ <td>-&gt;</td>
105
105
  <td class="context-item-value">orig_open</td>
106
106
  </tr>
107
107
  </table>
@@ -116,12 +116,12 @@
116
116
  <div id="methods">
117
117
  <h3 class="section-bar">Public Instance methods</h3>
118
118
 
119
- <div id="method-M000011" class="method-detail">
120
- <a name="M000011"></a>
119
+ <div id="method-M000013" class="method-detail">
120
+ <a name="M000013"></a>
121
121
 
122
122
  <div class="method-heading">
123
- <a href="Kernel.src/M000011.html" target="Code" class="method-signature"
124
- onclick="popupCode('Kernel.src/M000011.html');return false;">
123
+ <a href="Kernel.src/M000013.html" target="Code" class="method-signature"
124
+ onclick="popupCode('Kernel.src/M000013.html');return false;">
125
125
  <span class="method-name">log_open_files</span><span class="method-args">()</span>
126
126
  </a>
127
127
  </div>
@@ -130,12 +130,12 @@
130
130
  </div>
131
131
  </div>
132
132
 
133
- <div id="method-M000010" class="method-detail">
134
- <a name="M000010"></a>
133
+ <div id="method-M000012" class="method-detail">
134
+ <a name="M000012"></a>
135
135
 
136
136
  <div class="method-heading">
137
- <a href="Kernel.src/M000010.html" target="Code" class="method-signature"
138
- onclick="popupCode('Kernel.src/M000010.html');return false;">
137
+ <a href="Kernel.src/M000012.html" target="Code" class="method-signature"
138
+ onclick="popupCode('Kernel.src/M000012.html');return false;">
139
139
  <span class="method-name">open</span><span class="method-args">(*arg, &amp;blk)</span>
140
140
  </a>
141
141
  </div>