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
@@ -1,25 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>new (Mongrel::CGIWrapper)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/cgi.rb, line 42</span>
14
- 42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">request</span>, <span class="ruby-identifier">response</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
15
- 43: <span class="ruby-ivar">@request</span> = <span class="ruby-identifier">request</span>
16
- 44: <span class="ruby-ivar">@response</span> = <span class="ruby-identifier">response</span>
17
- 45: <span class="ruby-ivar">@args</span> = <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>
18
- 46: <span class="ruby-ivar">@input</span> = <span class="ruby-identifier">request</span>.<span class="ruby-identifier">body</span>
19
- 47: <span class="ruby-ivar">@head</span> = {}
20
- 48: <span class="ruby-ivar">@out_called</span> = <span class="ruby-keyword kw">false</span>
21
- 49: <span class="ruby-ivar">@default_really_final</span>=<span class="ruby-keyword kw">true</span>
22
- 50: <span class="ruby-keyword kw">super</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
23
- 51: <span class="ruby-keyword kw">end</span></pre>
24
- </body>
25
- </html>
@@ -1,47 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>header (Mongrel::CGIWrapper)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/cgi.rb, line 60</span>
14
- 60: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">header</span>(<span class="ruby-identifier">options</span> = <span class="ruby-value str">&quot;text/html&quot;</span>)
15
- 61: <span class="ruby-comment cmt"># if they pass in a string then just write the Content-Type</span>
16
- 62: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">String</span>
17
- 63: <span class="ruby-ivar">@head</span>[<span class="ruby-value str">'Content-Type'</span>] = <span class="ruby-identifier">options</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@head</span>[<span class="ruby-value str">'Content-Type'</span>]
18
- 64: <span class="ruby-keyword kw">else</span>
19
- 65: <span class="ruby-comment cmt"># convert the given options into what Mongrel wants</span>
20
- 66: <span class="ruby-ivar">@head</span>[<span class="ruby-value str">'Content-Type'</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-value str">'type'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">&quot;text/html&quot;</span>
21
- 67: <span class="ruby-ivar">@head</span>[<span class="ruby-value str">'Content-Type'</span>] <span class="ruby-operator">+=</span> <span class="ruby-value str">&quot;; charset=&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">options</span>[<span class="ruby-value str">'charset'</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-value str">&quot;charset&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value str">'charset'</span>]
22
- 68:
23
- 69: <span class="ruby-comment cmt"># setup date only if they use nph</span>
24
- 70: <span class="ruby-ivar">@head</span>[<span class="ruby-value str">'Date'</span>] = <span class="ruby-constant">CGI</span><span class="ruby-operator">::</span><span class="ruby-identifier">rfc1123_date</span>(<span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value str">'nph'</span>]
25
- 71:
26
- 72: <span class="ruby-comment cmt"># setup the server to use the default or what they set</span>
27
- 73: <span class="ruby-ivar">@head</span>[<span class="ruby-value str">'Server'</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-value str">'server'</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">env_table</span>[<span class="ruby-value str">'SERVER_SOFTWARE'</span>]
28
- 74:
29
- 75: <span class="ruby-comment cmt"># remaining possible options they can give</span>
30
- 76: <span class="ruby-ivar">@head</span>[<span class="ruby-value str">'Status'</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-value str">'status'</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value str">'status'</span>]
31
- 77: <span class="ruby-ivar">@head</span>[<span class="ruby-value str">'Content-Language'</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-value str">'language'</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value str">'language'</span>]
32
- 78: <span class="ruby-ivar">@head</span>[<span class="ruby-value str">'Expires'</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-value str">'expires'</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value str">'expires'</span>]
33
- 79:
34
- 80: <span class="ruby-comment cmt"># drop the keys we don't want anymore</span>
35
- 81: <span class="ruby-constant">REMOVED_KEYS</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">k</span>) }
36
- 82:
37
- 83: <span class="ruby-comment cmt"># finally just convert the rest raw (which puts 'cookie' directly)</span>
38
- 84: <span class="ruby-comment cmt"># 'cookie' is translated later as we write the header out</span>
39
- 85: <span class="ruby-identifier">options</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-ivar">@head</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">v</span>}
40
- 86: <span class="ruby-keyword kw">end</span>
41
- 87:
42
- 88: <span class="ruby-comment cmt"># doing this fakes out the cgi library to think the headers are empty</span>
43
- 89: <span class="ruby-comment cmt"># we then do the real headers in the out function call later</span>
44
- 90: <span class="ruby-value str">&quot;&quot;</span>
45
- 91: <span class="ruby-keyword kw">end</span></pre>
46
- </body>
47
- </html>
@@ -1,34 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>send_cookies (Mongrel::CGIWrapper)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/cgi.rb, line 98</span>
14
- 98: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_cookies</span>(<span class="ruby-identifier">to</span>)
15
- 99: <span class="ruby-comment cmt"># convert the cookies based on the myriad of possible ways to set a cookie</span>
16
- 100: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@head</span>[<span class="ruby-value str">'cookie'</span>]
17
- 101: <span class="ruby-identifier">cookie</span> = <span class="ruby-ivar">@head</span>[<span class="ruby-value str">'cookie'</span>]
18
- 102: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">cookie</span>
19
- 103: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Array</span>
20
- 104: <span class="ruby-identifier">cookie</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">to</span>[<span class="ruby-value str">'Set-Cookie'</span>] = <span class="ruby-identifier">c</span>.<span class="ruby-identifier">to_s</span> }
21
- 105: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Hash</span>
22
- 106: <span class="ruby-identifier">cookie</span>.<span class="ruby-identifier">each_value</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">to</span>[<span class="ruby-value str">'Set-Cookie'</span>] = <span class="ruby-identifier">c</span>.<span class="ruby-identifier">to_s</span>}
23
- 107: <span class="ruby-keyword kw">else</span>
24
- 108: <span class="ruby-identifier">to</span>[<span class="ruby-value str">'Set-Cookie'</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-value str">'cookie'</span>].<span class="ruby-identifier">to_s</span>
25
- 109: <span class="ruby-keyword kw">end</span>
26
- 110:
27
- 111: <span class="ruby-ivar">@head</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">'cookie'</span>)
28
- 112:
29
- 113: <span class="ruby-comment cmt"># @output_cookies seems to never be used, but we'll process it just in case</span>
30
- 114: <span class="ruby-ivar">@output_cookies</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">to</span>[<span class="ruby-value str">'Set-Cookie'</span>] = <span class="ruby-identifier">c</span>.<span class="ruby-identifier">to_s</span> } <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@output_cookies</span>
31
- 115: <span class="ruby-keyword kw">end</span>
32
- 116: <span class="ruby-keyword kw">end</span></pre>
33
- </body>
34
- </html>
@@ -1,22 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>start (Mongrel::Camping)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/camping.rb, line 86</span>
14
- 86: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Camping</span>.<span class="ruby-identifier">start</span>(<span class="ruby-identifier">server</span>, <span class="ruby-identifier">port</span>, <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">klass</span>)
15
- 87: <span class="ruby-identifier">h</span> = <span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">HttpServer</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">server</span>, <span class="ruby-identifier">port</span>)
16
- 88: <span class="ruby-identifier">h</span>.<span class="ruby-identifier">register</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-constant">CampingHandler</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">klass</span>))
17
- 89: <span class="ruby-identifier">h</span>.<span class="ruby-identifier">register</span>(<span class="ruby-value str">&quot;/favicon.ico&quot;</span>, <span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">Error404Handler</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;&quot;</span>))
18
- 90: <span class="ruby-identifier">h</span>.<span class="ruby-identifier">run</span>
19
- 91: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">h</span>
20
- 92: <span class="ruby-keyword kw">end</span></pre>
21
- </body>
22
- </html>
@@ -1,18 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>new (Mongrel::Camping::CampingHandler)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/camping.rb, line 36</span>
14
- 36: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">klass</span>)
15
- 37: <span class="ruby-ivar">@klass</span> = <span class="ruby-identifier">klass</span>
16
- 38: <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,51 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>process (Mongrel::Camping::CampingHandler)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/camping.rb, line 40</span>
14
- 40: <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
- 41: <span class="ruby-identifier">controller</span> = <span class="ruby-ivar">@klass</span>.<span class="ruby-identifier">run</span>(<span class="ruby-identifier">request</span>.<span class="ruby-identifier">body</span>, <span class="ruby-identifier">request</span>.<span class="ruby-identifier">params</span>)
16
- 42: <span class="ruby-identifier">sendfile</span>, <span class="ruby-identifier">clength</span> = <span class="ruby-keyword kw">nil</span>
17
- 43: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">status</span> = <span class="ruby-identifier">controller</span>.<span class="ruby-identifier">status</span>
18
- 44: <span class="ruby-identifier">controller</span>.<span class="ruby-identifier">headers</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
19
- 45: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">k</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^X-SENDFILE$/i</span>
20
- 46: <span class="ruby-identifier">sendfile</span> = <span class="ruby-identifier">v</span>
21
- 47: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">k</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^CONTENT-LENGTH$/i</span>
22
- 48: <span class="ruby-identifier">clength</span> = <span class="ruby-identifier">v</span>.<span class="ruby-identifier">to_i</span>
23
- 49: <span class="ruby-keyword kw">else</span>
24
- 50: [<span class="ruby-operator">*</span><span class="ruby-identifier">v</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">vi</span><span class="ruby-operator">|</span>
25
- 51: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">header</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">vi</span>
26
- 52: <span class="ruby-keyword kw">end</span>
27
- 53: <span class="ruby-keyword kw">end</span>
28
- 54: <span class="ruby-keyword kw">end</span>
29
- 55:
30
- 56: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">sendfile</span>
31
- 57: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">send_status</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">size</span>(<span class="ruby-identifier">sendfile</span>))
32
- 58: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">send_header</span>
33
- 59: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">send_file</span>(<span class="ruby-identifier">sendfile</span>)
34
- 60: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">controller</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:read</span>
35
- 61: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">send_status</span>(<span class="ruby-identifier">clength</span>)
36
- 62: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">send_header</span>
37
- 63: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">chunk</span> = <span class="ruby-identifier">controller</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">read</span>(<span class="ruby-value">16384</span>)
38
- 64: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">chunk</span>)
39
- 65: <span class="ruby-keyword kw">end</span>
40
- 66: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">controller</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:close</span>
41
- 67: <span class="ruby-identifier">controller</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">close</span>
42
- 68: <span class="ruby-keyword kw">end</span>
43
- 69: <span class="ruby-keyword kw">else</span>
44
- 70: <span class="ruby-identifier">body</span> = <span class="ruby-identifier">controller</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">to_s</span>
45
- 71: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">send_status</span>(<span class="ruby-identifier">body</span>.<span class="ruby-identifier">length</span>)
46
- 72: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">send_header</span>
47
- 73: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">body</span>)
48
- 74: <span class="ruby-keyword kw">end</span>
49
- 75: <span class="ruby-keyword kw">end</span></pre>
50
- </body>
51
- </html>
@@ -1,24 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>options (Mongrel::Command::Base)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line 31</span>
14
- 31: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">options</span>(<span class="ruby-identifier">opts</span>)
15
- 32: <span class="ruby-comment cmt"># process the given options array</span>
16
- 33: <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">short</span>, <span class="ruby-identifier">long</span>, <span class="ruby-identifier">help</span>, <span class="ruby-identifier">variable</span>, <span class="ruby-identifier">default</span><span class="ruby-operator">|</span>
17
- 34: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-identifier">variable</span>, <span class="ruby-identifier">default</span>)
18
- 35: <span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-identifier">short</span>, <span class="ruby-identifier">long</span>, <span class="ruby-identifier">help</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">arg</span><span class="ruby-operator">|</span>
19
- 36: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-identifier">variable</span>, <span class="ruby-identifier">arg</span>)
20
- 37: <span class="ruby-keyword kw">end</span>
21
- 38: <span class="ruby-keyword kw">end</span>
22
- 39: <span class="ruby-keyword kw">end</span></pre>
23
- </body>
24
- </html>
@@ -1,42 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>new (Mongrel::Command::Base)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line 43</span>
14
- 43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>={})
15
- 44: <span class="ruby-identifier">argv</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:argv</span>] <span class="ruby-operator">||</span> []
16
- 45: <span class="ruby-ivar">@opt</span> = <span class="ruby-constant">OptionParser</span>.<span class="ruby-identifier">new</span>
17
- 46: <span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">banner</span> = <span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">Command</span><span class="ruby-operator">::</span><span class="ruby-constant">BANNER</span>
18
- 47: <span class="ruby-ivar">@valid</span> = <span class="ruby-keyword kw">true</span>
19
- 48: <span class="ruby-comment cmt"># this is retarded, but it has to be done this way because -h and -v exit</span>
20
- 49: <span class="ruby-ivar">@done_validating</span> = <span class="ruby-keyword kw">false</span>
21
- 50: <span class="ruby-ivar">@original_args</span> = <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">dup</span>
22
- 51:
23
- 52: <span class="ruby-identifier">configure</span>
24
- 53:
25
- 54: <span class="ruby-comment cmt"># I need to add my own -h definition to prevent the -h by default from exiting.</span>
26
- 55: <span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">on_tail</span>(<span class="ruby-value str">&quot;-h&quot;</span>, <span class="ruby-value str">&quot;--help&quot;</span>, <span class="ruby-value str">&quot;Show this message&quot;</span>) <span class="ruby-keyword kw">do</span>
27
- 56: <span class="ruby-ivar">@done_validating</span> = <span class="ruby-keyword kw">true</span>
28
- 57: <span class="ruby-identifier">puts</span> <span class="ruby-ivar">@opt</span>
29
- 58: <span class="ruby-keyword kw">end</span>
30
- 59:
31
- 60: <span class="ruby-comment cmt"># I need to add my own -v definition to prevent the -v from exiting by default as well.</span>
32
- 61: <span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">on_tail</span>(<span class="ruby-value str">&quot;--version&quot;</span>, <span class="ruby-value str">&quot;Show version&quot;</span>) <span class="ruby-keyword kw">do</span>
33
- 62: <span class="ruby-ivar">@done_validating</span> = <span class="ruby-keyword kw">true</span>
34
- 63: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">VERSION</span>
35
- 64: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Version #{Mongrel::Const::MONGREL_VERSION}&quot;</span>
36
- 65: <span class="ruby-keyword kw">end</span>
37
- 66: <span class="ruby-keyword kw">end</span>
38
- 67:
39
- 68: <span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">parse!</span> <span class="ruby-identifier">argv</span>
40
- 69: <span class="ruby-keyword kw">end</span></pre>
41
- </body>
42
- </html>
@@ -1,20 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>commands (Mongrel::Command::Registry)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line 149</span>
14
- 149: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">commands</span>
15
- 150: <span class="ruby-identifier">pmgr</span> = <span class="ruby-constant">GemPlugin</span><span class="ruby-operator">::</span><span class="ruby-constant">Manager</span>.<span class="ruby-identifier">instance</span>
16
- 151: <span class="ruby-identifier">list</span> = <span class="ruby-identifier">pmgr</span>.<span class="ruby-identifier">plugins</span>[<span class="ruby-value str">&quot;/commands&quot;</span>].<span class="ruby-identifier">keys</span>
17
- 152: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">sort</span>
18
- 153: <span class="ruby-keyword kw">end</span></pre>
19
- </body>
20
- </html>
@@ -1,27 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>new (Mongrel::Configurator)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/configurator.rb, line 42</span>
14
- 42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">defaults</span>={}, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
15
- 43: <span class="ruby-ivar">@listener</span> = <span class="ruby-keyword kw">nil</span>
16
- 44: <span class="ruby-ivar">@listener_name</span> = <span class="ruby-keyword kw">nil</span>
17
- 45: <span class="ruby-ivar">@listeners</span> = {}
18
- 46: <span class="ruby-ivar">@defaults</span> = <span class="ruby-identifier">defaults</span>
19
- 47: <span class="ruby-ivar">@needs_restart</span> = <span class="ruby-keyword kw">false</span>
20
- 48: <span class="ruby-ivar">@pid_file</span> = <span class="ruby-identifier">defaults</span>[<span class="ruby-identifier">:pid_file</span>]
21
- 49:
22
- 50: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">blk</span>
23
- 51: <span class="ruby-identifier">cloaker</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>).<span class="ruby-identifier">bind</span>(<span class="ruby-keyword kw">self</span>).<span class="ruby-identifier">call</span>
24
- 52: <span class="ruby-keyword kw">end</span>
25
- 53: <span class="ruby-keyword kw">end</span></pre>
26
- </body>
27
- </html>
@@ -1,31 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>change_privilege (Mongrel::Configurator)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/configurator.rb, line 56</span>
14
- 56: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">change_privilege</span>(<span class="ruby-identifier">user</span>, <span class="ruby-identifier">group</span>)
15
- 57: <span class="ruby-keyword kw">begin</span>
16
- 58: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">group</span>
17
- 59: <span class="ruby-identifier">log</span> <span class="ruby-node">&quot;Changing group to #{group}.&quot;</span>
18
- 60: <span class="ruby-constant">Process</span><span class="ruby-operator">::</span><span class="ruby-constant">GID</span>.<span class="ruby-identifier">change_privilege</span>(<span class="ruby-constant">Etc</span>.<span class="ruby-identifier">getgrnam</span>(<span class="ruby-identifier">group</span>).<span class="ruby-identifier">gid</span>)
19
- 61: <span class="ruby-keyword kw">end</span>
20
- 62:
21
- 63: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">user</span>
22
- 64: <span class="ruby-identifier">log</span> <span class="ruby-node">&quot;Changing user to #{user}.&quot;</span>
23
- 65: <span class="ruby-constant">Process</span><span class="ruby-operator">::</span><span class="ruby-constant">UID</span>.<span class="ruby-identifier">change_privilege</span>(<span class="ruby-constant">Etc</span>.<span class="ruby-identifier">getpwnam</span>(<span class="ruby-identifier">user</span>).<span class="ruby-identifier">uid</span>)
24
- 66: <span class="ruby-keyword kw">end</span>
25
- 67: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">EPERM</span>
26
- 68: <span class="ruby-identifier">log</span> <span class="ruby-node">&quot;FAILED to change user:group #{user}:#{group}: #$!&quot;</span>
27
- 69: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
28
- 70: <span class="ruby-keyword kw">end</span>
29
- 71: <span class="ruby-keyword kw">end</span></pre>
30
- </body>
31
- </html>
@@ -1,21 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>new (Mongrel::DirHandler)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 124</span>
14
- 124: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">listing_allowed</span>=<span class="ruby-keyword kw">true</span>, <span class="ruby-identifier">index_html</span>=<span class="ruby-value str">&quot;index.html&quot;</span>)
15
- 125: <span class="ruby-ivar">@path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">path</span>)
16
- 126: <span class="ruby-ivar">@listing_allowed</span>=<span class="ruby-identifier">listing_allowed</span>
17
- 127: <span class="ruby-ivar">@index_html</span> = <span class="ruby-identifier">index_html</span>
18
- 128: <span class="ruby-ivar">@default_content_type</span> = <span class="ruby-value str">&quot;text/plain; charset=ISO-8859-1&quot;</span>.<span class="ruby-identifier">freeze</span>
19
- 129: <span class="ruby-keyword kw">end</span></pre>
20
- </body>
21
- </html>
@@ -1,43 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>can_serve (Mongrel::DirHandler)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 132</span>
14
- 132: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">can_serve</span>(<span class="ruby-identifier">path_info</span>)
15
- 133: <span class="ruby-comment cmt"># TODO: investigate freezing the path_info to prevent double escaping</span>
16
- 134: <span class="ruby-identifier">req_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-ivar">@path</span>,<span class="ruby-constant">HttpRequest</span>.<span class="ruby-identifier">unescape</span>(<span class="ruby-identifier">path_info</span>)), <span class="ruby-ivar">@path</span>)
17
- 135:
18
- 136: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">req_path</span>.<span class="ruby-identifier">index</span>(<span class="ruby-ivar">@path</span>) <span class="ruby-operator">==</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">and</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span> <span class="ruby-identifier">req_path</span>
19
- 137: <span class="ruby-comment cmt"># it exists and it's in the right location</span>
20
- 138: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span> <span class="ruby-identifier">req_path</span>
21
- 139: <span class="ruby-comment cmt"># the request is for a directory</span>
22
- 140: <span class="ruby-identifier">index</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">req_path</span>, <span class="ruby-ivar">@index_html</span>)
23
- 141: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span> <span class="ruby-identifier">index</span>
24
- 142: <span class="ruby-comment cmt"># serve the index</span>
25
- 143: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">index</span>
26
- 144: <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@listing_allowed</span>
27
- 145: <span class="ruby-comment cmt"># serve the directory</span>
28
- 146: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">req_path</span>
29
- 147: <span class="ruby-keyword kw">else</span>
30
- 148: <span class="ruby-comment cmt"># do not serve anything</span>
31
- 149: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
32
- 150: <span class="ruby-keyword kw">end</span>
33
- 151: <span class="ruby-keyword kw">else</span>
34
- 152: <span class="ruby-comment cmt"># it's a file and it's there</span>
35
- 153: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">req_path</span>
36
- 154: <span class="ruby-keyword kw">end</span>
37
- 155: <span class="ruby-keyword kw">else</span>
38
- 156: <span class="ruby-comment cmt"># does not exist or isn't in the right spot</span>
39
- 157: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
40
- 158: <span class="ruby-keyword kw">end</span>
41
- 159: <span class="ruby-keyword kw">end</span></pre>
42
- </body>
43
- </html>
@@ -1,18 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>[]= (Mongrel::HeaderOut)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 322</span>
14
- 322: <span class="ruby-keyword kw">def</span><span class="ruby-operator">[]=</span>(<span class="ruby-identifier">key</span>,<span class="ruby-identifier">value</span>)
15
- 323: <span class="ruby-ivar">@out</span>.<span class="ruby-identifier">write</span>(<span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">HEADER_FORMAT</span> <span class="ruby-operator">%</span> [<span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>])
16
- 324: <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,17 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html>
7
- <head>
8
- <title>request_progress (Mongrel::HttpHandlerPlugin)</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
- </head>
12
- <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/handlers.rb, line 57</span>
14
- 57: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">request_progress</span>(<span class="ruby-identifier">params</span>, <span class="ruby-identifier">clen</span>, <span class="ruby-identifier">total</span>)
15
- 58: <span class="ruby-keyword kw">end</span></pre>
16
- </body>
17
- </html>