mongrel 0.3.12.4 → 0.3.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (264) hide show
  1. data/Rakefile +44 -33
  2. data/bin/mongrel_rails +67 -34
  3. data/doc/rdoc/classes/IO.html +10 -10
  4. data/doc/rdoc/classes/IO.src/{M000005.html → M000001.html} +5 -5
  5. data/doc/rdoc/classes/IO.src/{M000006.html → M000002.html} +5 -5
  6. data/doc/rdoc/classes/Kernel.html +10 -10
  7. data/doc/rdoc/classes/Kernel.src/{M000025.html → M000020.html} +5 -5
  8. data/doc/rdoc/classes/Kernel.src/M000021.html +23 -0
  9. data/doc/rdoc/classes/Mongrel.html +25 -4
  10. data/doc/rdoc/classes/Mongrel/CGIWrapper.html +383 -0
  11. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000096.html +11 -5
  12. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000097.html +34 -5
  13. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000098.html +21 -6
  14. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/{M000093.html → M000099.html} +13 -13
  15. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/{M000094.html → M000100.html} +11 -11
  16. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/{M000095.html → M000101.html} +4 -4
  17. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000102.html +18 -0
  18. data/doc/rdoc/classes/Mongrel/{URIClassifier.src/M000084.html → CGIWrapper.src/M000103.html} +5 -5
  19. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000104.html +19 -0
  20. data/doc/rdoc/classes/Mongrel/Camping.html +5 -5
  21. data/doc/rdoc/classes/Mongrel/Camping.src/M000046.html +22 -0
  22. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.html +10 -10
  23. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/{M000049.html → M000047.html} +4 -4
  24. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000048.html +51 -0
  25. data/doc/rdoc/classes/Mongrel/Command.html +13 -0
  26. data/doc/rdoc/classes/Mongrel/Command/Base.html +95 -50
  27. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000024.html +24 -0
  28. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000025.html +42 -0
  29. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000026.html +18 -0
  30. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000027.html +18 -0
  31. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000028.html +18 -0
  32. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000029.html +5 -11
  33. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000030.html +9 -28
  34. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000031.html +5 -5
  35. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000032.html +5 -5
  36. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000033.html +5 -5
  37. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000034.html +11 -9
  38. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000035.html +11 -5
  39. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000036.html +5 -5
  40. data/doc/rdoc/classes/Mongrel/Command/Registry.html +15 -15
  41. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000037.html +20 -0
  42. data/doc/rdoc/classes/Mongrel/Command/Registry.src/{M000040.html → M000038.html} +11 -11
  43. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000039.html +37 -7
  44. data/doc/rdoc/classes/Mongrel/Configurator.html +651 -0
  45. data/doc/rdoc/classes/Mongrel/Configurator.src/M000105.html +16 -20
  46. data/doc/rdoc/classes/Mongrel/Configurator.src/M000106.html +18 -5
  47. data/doc/rdoc/classes/Mongrel/Configurator.src/M000107.html +7 -11
  48. data/doc/rdoc/classes/Mongrel/Configurator.src/M000108.html +7 -6
  49. data/doc/rdoc/classes/Mongrel/Configurator.src/M000109.html +10 -9
  50. data/doc/rdoc/classes/Mongrel/Configurator.src/M000110.html +5 -8
  51. data/doc/rdoc/classes/Mongrel/Configurator.src/M000111.html +21 -5
  52. data/doc/rdoc/classes/Mongrel/Configurator.src/M000112.html +6 -15
  53. data/doc/rdoc/classes/Mongrel/Configurator.src/M000113.html +17 -5
  54. data/doc/rdoc/classes/Mongrel/Configurator.src/M000114.html +20 -33
  55. data/doc/rdoc/classes/Mongrel/Configurator.src/M000115.html +5 -5
  56. data/doc/rdoc/classes/Mongrel/Configurator.src/M000116.html +24 -0
  57. data/doc/rdoc/classes/Mongrel/Configurator.src/M000117.html +19 -0
  58. data/doc/rdoc/classes/Mongrel/Configurator.src/M000118.html +22 -0
  59. data/doc/rdoc/classes/Mongrel/Configurator.src/M000119.html +25 -0
  60. data/doc/rdoc/classes/Mongrel/Configurator.src/M000120.html +18 -0
  61. data/doc/rdoc/classes/Mongrel/Configurator.src/M000121.html +35 -0
  62. data/doc/rdoc/classes/Mongrel/Configurator.src/M000122.html +18 -0
  63. data/doc/rdoc/classes/Mongrel/Configurator.src/M000123.html +33 -0
  64. data/doc/rdoc/classes/Mongrel/Configurator.src/M000124.html +18 -0
  65. data/doc/rdoc/classes/Mongrel/Const.html +39 -7
  66. data/doc/rdoc/classes/Mongrel/DeflateFilter.html +181 -0
  67. data/doc/rdoc/classes/Mongrel/DeflateFilter.src/M000094.html +19 -0
  68. data/doc/rdoc/classes/Mongrel/DeflateFilter.src/M000095.html +28 -0
  69. data/doc/rdoc/classes/Mongrel/DirHandler.html +48 -33
  70. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000056.html +21 -0
  71. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000057.html +43 -0
  72. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000058.html +29 -7
  73. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000059.html +50 -29
  74. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000060.html +26 -27
  75. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000061.html +5 -38
  76. data/doc/rdoc/classes/Mongrel/Error404Handler.html +171 -0
  77. data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000116.html → M000125.html} +4 -4
  78. data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000117.html → M000126.html} +4 -4
  79. data/doc/rdoc/classes/Mongrel/HeaderOut.html +185 -0
  80. data/doc/rdoc/classes/Mongrel/HeaderOut.src/{M000072.html → M000069.html} +4 -4
  81. data/doc/rdoc/classes/Mongrel/HeaderOut.src/{M000073.html → M000070.html} +4 -4
  82. data/doc/rdoc/classes/Mongrel/HttpHandler.html +170 -0
  83. data/doc/rdoc/classes/Mongrel/HttpHandler.src/{M000074.html → M000075.html} +3 -3
  84. data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.html +20 -10
  85. data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/{M000027.html → M000022.html} +5 -4
  86. data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/{M000028.html → M000023.html} +3 -3
  87. data/doc/rdoc/classes/Mongrel/HttpParser.html +41 -36
  88. data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000056.html → M000049.html} +6 -5
  89. data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000057.html → M000050.html} +7 -6
  90. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000051.html +7 -6
  91. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000052.html +37 -7
  92. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000053.html +5 -7
  93. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000054.html +6 -22
  94. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000055.html +6 -5
  95. data/doc/rdoc/classes/Mongrel/HttpRequest.html +239 -0
  96. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000130.html +52 -0
  97. data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000119.html → M000131.html} +6 -6
  98. data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000120.html → M000132.html} +6 -6
  99. data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000121.html → M000133.html} +18 -18
  100. data/doc/rdoc/classes/Mongrel/HttpResponse.html +439 -0
  101. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000076.html +12 -7
  102. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000077.html +7 -12
  103. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000078.html +12 -9
  104. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000079.html +9 -9
  105. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000080.html +9 -10
  106. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000081.html +9 -5
  107. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000082.html +18 -7
  108. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000083.html +8 -5
  109. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000084.html +20 -0
  110. data/doc/rdoc/classes/Mongrel/{HttpServer.src/M000069.html → HttpResponse.src/M000085.html} +7 -5
  111. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000086.html +20 -0
  112. data/doc/rdoc/classes/Mongrel/{Configurator.src/M000101.html → HttpResponse.src/M000087.html} +5 -5
  113. data/doc/rdoc/classes/Mongrel/HttpServer.html +68 -59
  114. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000062.html +25 -0
  115. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000063.html +83 -0
  116. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000064.html +13 -11
  117. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000065.html +50 -53
  118. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000066.html +21 -11
  119. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000067.html +5 -47
  120. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000068.html +9 -15
  121. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.html +16 -16
  122. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000040.html +39 -0
  123. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/{M000043.html → M000041.html} +11 -11
  124. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000042.html +13 -22
  125. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.html +17 -17
  126. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000043.html +22 -0
  127. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000044.html +51 -0
  128. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000045.html +10 -9
  129. data/doc/rdoc/classes/Mongrel/StatisticsFilter.html +211 -0
  130. data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/M000127.html +24 -0
  131. data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/M000128.html +24 -0
  132. data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/M000129.html +18 -0
  133. data/doc/rdoc/classes/{Class.html → Mongrel/StatusHandler.html} +42 -45
  134. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000071.html +18 -0
  135. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000072.html +24 -0
  136. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000073.html +42 -0
  137. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000074.html +20 -0
  138. data/doc/rdoc/classes/Mongrel/StopServer.html +117 -0
  139. data/doc/rdoc/classes/Mongrel/URIClassifier.html +314 -0
  140. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000088.html +5 -23
  141. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000089.html +5 -70
  142. data/doc/rdoc/classes/Mongrel/URIClassifier.src/{M000086.html → M000090.html} +0 -0
  143. data/doc/rdoc/classes/Mongrel/URIClassifier.src/{M000087.html → M000091.html} +0 -0
  144. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000092.html +36 -0
  145. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000093.html +83 -0
  146. data/doc/rdoc/classes/MongrelDbg.html +25 -25
  147. data/doc/rdoc/classes/MongrelDbg.src/{M000020.html → M000015.html} +5 -5
  148. data/doc/rdoc/classes/MongrelDbg.src/{M000021.html → M000016.html} +6 -6
  149. data/doc/rdoc/classes/MongrelDbg.src/{M000022.html → M000017.html} +8 -8
  150. data/doc/rdoc/classes/MongrelDbg.src/{M000023.html → M000018.html} +7 -7
  151. data/doc/rdoc/classes/MongrelDbg.src/{M000024.html → M000019.html} +4 -4
  152. data/doc/rdoc/classes/ObjectTracker.html +10 -40
  153. data/doc/rdoc/classes/ObjectTracker.src/M000013.html +27 -0
  154. data/doc/rdoc/classes/ObjectTracker.src/M000014.html +44 -0
  155. data/doc/rdoc/classes/RequestLog.html +115 -0
  156. data/doc/rdoc/classes/RequestLog/Access.html +151 -0
  157. data/doc/rdoc/classes/RequestLog/Access.src/{M000122.html → M000134.html} +5 -5
  158. data/doc/rdoc/classes/RequestLog/Files.html +144 -0
  159. data/doc/rdoc/classes/RequestLog/Files.src/{M000123.html → M000135.html} +5 -5
  160. data/doc/rdoc/classes/RequestLog/Objects.html +144 -0
  161. data/doc/rdoc/classes/RequestLog/Objects.src/{M000124.html → M000137.html} +5 -5
  162. data/doc/rdoc/classes/RequestLog/Params.html +144 -0
  163. data/doc/rdoc/classes/RequestLog/Params.src/{M000125.html → M000138.html} +5 -5
  164. data/doc/rdoc/classes/RequestLog/Threads.html +144 -0
  165. data/doc/rdoc/classes/RequestLog/Threads.src/M000136.html +34 -0
  166. data/doc/rdoc/classes/Stats.html +54 -36
  167. data/doc/rdoc/classes/Stats.src/{M000013.html → M000005.html} +6 -5
  168. data/doc/rdoc/classes/Stats.src/M000006.html +23 -0
  169. data/doc/rdoc/classes/Stats.src/M000007.html +26 -0
  170. data/doc/rdoc/classes/Stats.src/M000008.html +18 -0
  171. data/doc/rdoc/classes/Stats.src/M000009.html +5 -6
  172. data/doc/rdoc/classes/Stats.src/M000010.html +5 -10
  173. data/doc/rdoc/classes/Stats.src/M000011.html +10 -13
  174. data/doc/rdoc/classes/Stats.src/M000012.html +7 -5
  175. data/doc/rdoc/classes/TCPServer.html +9 -9
  176. data/doc/rdoc/classes/TCPServer.src/M000003.html +19 -0
  177. data/doc/rdoc/created.rid +1 -1
  178. data/doc/rdoc/files/COPYING.html +1 -1
  179. data/doc/rdoc/files/LICENSE.html +1 -1
  180. data/doc/rdoc/files/README.html +1 -1
  181. data/doc/rdoc/files/ext/http11/http11_c.html +1 -1
  182. data/doc/rdoc/files/lib/mongrel/camping_rb.html +28 -1
  183. data/doc/rdoc/files/lib/mongrel/cgi_rb.html +28 -1
  184. data/doc/rdoc/files/lib/mongrel/command_rb.html +28 -1
  185. data/doc/rdoc/files/lib/mongrel/debug_rb.html +28 -1
  186. data/doc/rdoc/files/lib/mongrel/handlers_rb.html +3 -3
  187. data/doc/rdoc/files/lib/mongrel/init_rb.html +28 -1
  188. data/doc/rdoc/files/lib/mongrel/rails_rb.html +28 -1
  189. data/doc/rdoc/files/lib/mongrel/stats_rb.html +21 -10
  190. data/doc/rdoc/files/lib/mongrel/tcphack_rb.html +23 -4
  191. data/doc/rdoc/files/lib/mongrel_rb.html +33 -1
  192. data/doc/rdoc/fr_class_index.html +65 -0
  193. data/doc/rdoc/fr_file_index.html +40 -0
  194. data/doc/rdoc/fr_method_index.html +164 -0
  195. data/doc/rdoc/index.html +24 -0
  196. data/examples/camping/blog.rb +1 -1
  197. data/examples/camping/tepee.rb +4 -3
  198. data/examples/simpletest.rb +15 -14
  199. data/ext/http11/http11.c +52 -18
  200. data/ext/http11/http11_parser.c +194 -177
  201. data/ext/http11/http11_parser.h +23 -5
  202. data/lib/mongrel.rb +295 -134
  203. data/lib/mongrel/camping.rb +48 -6
  204. data/lib/mongrel/cgi.rb +20 -2
  205. data/lib/mongrel/command.rb +76 -27
  206. data/lib/mongrel/debug.rb +42 -13
  207. data/lib/mongrel/handlers.rb +218 -59
  208. data/lib/mongrel/init.rb +18 -0
  209. data/lib/mongrel/rails.rb +61 -44
  210. data/lib/mongrel/stats.rb +30 -2
  211. data/lib/mongrel/tcphack.rb +18 -0
  212. data/setup.rb +799 -574
  213. data/test/mime.yaml +3 -0
  214. data/test/mongrel.conf +1 -0
  215. data/test/test_command.rb +101 -0
  216. data/test/test_conditional.rb +124 -0
  217. data/test/test_configurator.rb +56 -22
  218. data/test/test_debug.rb +18 -2
  219. data/test/test_handlers.rb +105 -0
  220. data/test/test_http11.rb +27 -9
  221. data/test/test_response.rb +38 -0
  222. data/test/test_stats.rb +21 -2
  223. data/test/test_uriclassifier.rb +18 -0
  224. data/test/test_ws.rb +105 -19
  225. data/test/testhelp.rb +36 -0
  226. data/tools/rakehelp.rb +52 -46
  227. data/tools/trickletest.rb +37 -0
  228. metadata +127 -76
  229. data/doc/rdoc/classes/Class.src/M000001.html +0 -24
  230. data/doc/rdoc/classes/Class.src/M000002.html +0 -62
  231. data/doc/rdoc/classes/Class.src/M000003.html +0 -21
  232. data/doc/rdoc/classes/Class.src/M000004.html +0 -20
  233. data/doc/rdoc/classes/Kernel.src/M000026.html +0 -25
  234. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000090.html +0 -24
  235. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000091.html +0 -47
  236. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000092.html +0 -34
  237. data/doc/rdoc/classes/Mongrel/Camping.src/M000048.html +0 -22
  238. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000050.html +0 -27
  239. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000037.html +0 -18
  240. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000038.html +0 -18
  241. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000041.html +0 -46
  242. data/doc/rdoc/classes/Mongrel/Configurator.src/M000099.html +0 -24
  243. data/doc/rdoc/classes/Mongrel/Configurator.src/M000100.html +0 -23
  244. data/doc/rdoc/classes/Mongrel/Configurator.src/M000102.html +0 -32
  245. data/doc/rdoc/classes/Mongrel/Configurator.src/M000103.html +0 -19
  246. data/doc/rdoc/classes/Mongrel/Configurator.src/M000104.html +0 -31
  247. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000062.html +0 -40
  248. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000063.html +0 -18
  249. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000118.html +0 -28
  250. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000075.html +0 -26
  251. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000070.html +0 -22
  252. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000071.html +0 -18
  253. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000044.html +0 -32
  254. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000046.html +0 -48
  255. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000047.html +0 -23
  256. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000085.html +0 -18
  257. data/doc/rdoc/classes/ObjectTracker.src/M000016.html +0 -22
  258. data/doc/rdoc/classes/ObjectTracker.src/M000017.html +0 -18
  259. data/doc/rdoc/classes/ObjectTracker.src/M000018.html +0 -18
  260. data/doc/rdoc/classes/ObjectTracker.src/M000019.html +0 -44
  261. data/doc/rdoc/classes/Stats.src/M000014.html +0 -19
  262. data/doc/rdoc/classes/Stats.src/M000015.html +0 -20
  263. data/doc/rdoc/classes/TCPServer.src/M000007.html +0 -19
  264. data/lib/mongrel/#rails.rb# +0 -178
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>join (Mongrel::Configurator)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 960</span>
14
+ 960: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">join</span>
15
+ 961: <span class="ruby-ivar">@listeners</span>.<span class="ruby-identifier">values</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">acceptor</span>.<span class="ruby-identifier">join</span> }
16
+ 962: <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,35 @@
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>debug (Mongrel::Configurator)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 972</span>
14
+ 972: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">debug</span>(<span class="ruby-identifier">location</span>, <span class="ruby-identifier">what</span> = [<span class="ruby-identifier">:object</span>, <span class="ruby-identifier">:rails</span>, <span class="ruby-identifier">:files</span>, <span class="ruby-identifier">:threads</span>, <span class="ruby-identifier">:params</span>])
15
+ 973: <span class="ruby-identifier">require</span> <span class="ruby-value str">'mongrel/debug'</span>
16
+ 974: <span class="ruby-identifier">handlers</span> = {
17
+ 975: <span class="ruby-identifier">:object</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;/handlers/requestlog::access&quot;</span>,
18
+ 976: <span class="ruby-identifier">:rails</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;/handlers/requestlog::files&quot;</span>,
19
+ 977: <span class="ruby-identifier">:files</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;/handlers/requestlog::objects&quot;</span>,
20
+ 978: <span class="ruby-identifier">:threads</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;/handlers/requestlog::threads&quot;</span>,
21
+ 979: <span class="ruby-identifier">:params</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;/handlers/requestlog::params&quot;</span>
22
+ 980: }
23
+ 981:
24
+ 982: <span class="ruby-comment cmt"># turn on the debugging infrastructure, and ObjectTracker is a pig</span>
25
+ 983: <span class="ruby-constant">ObjectTracker</span>.<span class="ruby-identifier">configure</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">what</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">:object</span>
26
+ 984: <span class="ruby-constant">MongrelDbg</span>.<span class="ruby-identifier">configure</span>
27
+ 985:
28
+ 986: <span class="ruby-comment cmt"># now we roll through each requested debug type, turn it on and load that plugin</span>
29
+ 987: <span class="ruby-identifier">what</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">type</span><span class="ruby-operator">|</span>
30
+ 988: <span class="ruby-constant">MongrelDbg</span>.<span class="ruby-identifier">begin_trace</span> <span class="ruby-identifier">type</span>
31
+ 989: <span class="ruby-identifier">uri</span> <span class="ruby-identifier">location</span>, <span class="ruby-identifier">:handler</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">plugin</span>(<span class="ruby-identifier">handlers</span>[<span class="ruby-identifier">type</span>])
32
+ 990: <span class="ruby-keyword kw">end</span>
33
+ 991: <span class="ruby-keyword kw">end</span></pre>
34
+ </body>
35
+ </html>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>run_config (Mongrel::Configurator)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 997</span>
14
+ 997: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run_config</span>(<span class="ruby-identifier">script</span>)
15
+ 998: <span class="ruby-identifier">open</span>(<span class="ruby-identifier">script</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">eval</span>(<span class="ruby-identifier">f</span>.<span class="ruby-identifier">read</span>, <span class="ruby-identifier">proc</span> {<span class="ruby-keyword kw">self</span>}) }
16
+ 999: <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,33 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>setup_signals (Mongrel::Configurator)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 1011</span>
14
+ 1011: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup_signals</span>(<span class="ruby-identifier">options</span>={})
15
+ 1012: <span class="ruby-identifier">ops</span> = <span class="ruby-identifier">resolve_defaults</span>(<span class="ruby-identifier">options</span>)
16
+ 1013:
17
+ 1014: <span class="ruby-comment cmt"># forced shutdown, even if previously restarted (actually just like TERM but for CTRL-C)</span>
18
+ 1015: <span class="ruby-identifier">trap</span>(<span class="ruby-value str">&quot;INT&quot;</span>) { <span class="ruby-identifier">log</span> <span class="ruby-value str">&quot;INT signal received.&quot;</span>; <span class="ruby-identifier">stop</span>(<span class="ruby-identifier">need_restart</span>=<span class="ruby-keyword kw">false</span>) }
19
+ 1016:
20
+ 1017: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/mswin/</span>
21
+ 1018: <span class="ruby-comment cmt"># graceful shutdown</span>
22
+ 1019: <span class="ruby-identifier">trap</span>(<span class="ruby-value str">&quot;TERM&quot;</span>) { <span class="ruby-identifier">log</span> <span class="ruby-value str">&quot;TERM signal received.&quot;</span>; <span class="ruby-identifier">stop</span> }
23
+ 1020:
24
+ 1021: <span class="ruby-comment cmt"># restart</span>
25
+ 1022: <span class="ruby-identifier">trap</span>(<span class="ruby-value str">&quot;USR2&quot;</span>) { <span class="ruby-identifier">log</span> <span class="ruby-value str">&quot;USR2 signal received.&quot;</span>; <span class="ruby-identifier">stop</span>(<span class="ruby-identifier">need_restart</span>=<span class="ruby-keyword kw">true</span>) }
26
+ 1023:
27
+ 1024: <span class="ruby-identifier">log</span> <span class="ruby-value str">&quot;Signals ready. TERM =&gt; stop. USR2 =&gt; restart. INT =&gt; stop (no restart).&quot;</span>
28
+ 1025: <span class="ruby-keyword kw">else</span>
29
+ 1026: <span class="ruby-identifier">log</span> <span class="ruby-value str">&quot;Signals ready. INT =&gt; stop (no restart).&quot;</span>
30
+ 1027: <span class="ruby-keyword kw">end</span>
31
+ 1028: <span class="ruby-keyword kw">end</span></pre>
32
+ </body>
33
+ </html>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>log (Mongrel::Configurator)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 1031</span>
14
+ 1031: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log</span>(<span class="ruby-identifier">msg</span>)
15
+ 1032: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">print</span> <span class="ruby-value str">&quot;** &quot;</span>, <span class="ruby-identifier">msg</span>, <span class="ruby-value str">&quot;\n&quot;</span>
16
+ 1033: <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -128,7 +128,7 @@ href="URIClassifier.html">URIClassifier</a> will determine this.
128
128
  <td class="context-item-value">&quot;SCRIPT_NAME&quot;.freeze</td>
129
129
  <td width="3em">&nbsp;</td>
130
130
  <td class="context-item-desc">
131
- This is the intial part that your handler is identified as by <a
131
+ This is the initial part that your handler is identified as by <a
132
132
  href="URIClassifier.html">URIClassifier</a>.
133
133
 
134
134
  </td>
@@ -148,7 +148,18 @@ SCRIPT_NAME.
148
148
  <tr class="top-aligned-row context-row">
149
149
  <td class="context-item-name">MONGREL_VERSION</td>
150
150
  <td>=</td>
151
- <td class="context-item-value">&quot;0.3.12.1&quot;.freeze</td>
151
+ <td class="context-item-value">&quot;0.3.13&quot;.freeze</td>
152
+ </tr>
153
+ <tr class="top-aligned-row context-row">
154
+ <td class="context-item-name">MONGREL_TMP_BASE</td>
155
+ <td>=</td>
156
+ <td class="context-item-value">&quot;mongrel&quot;.freeze</td>
157
+ <td width="3em">&nbsp;</td>
158
+ <td class="context-item-desc">
159
+ TODO: this use of a base for tempfiles needs to be looked at for security
160
+ problems
161
+
162
+ </td>
152
163
  </tr>
153
164
  <tr class="top-aligned-row context-row">
154
165
  <td class="context-item-name">ERROR_404_RESPONSE</td>
@@ -179,7 +190,7 @@ A common header for indicating the server is too busy. Not used yet.
179
190
  <tr class="top-aligned-row context-row">
180
191
  <td class="context-item-name">CHUNK_SIZE</td>
181
192
  <td>=</td>
182
- <td class="context-item-value">(16 * 1024)</td>
193
+ <td class="context-item-value">(4 * 1024)</td>
183
194
  <td width="3em">&nbsp;</td>
184
195
  <td class="context-item-desc">
185
196
  The basic max request size we&#8217;ll try to read.
@@ -187,13 +198,24 @@ The basic max request size we&#8217;ll try to read.
187
198
  </td>
188
199
  </tr>
189
200
  <tr class="top-aligned-row context-row">
190
- <td class="context-item-name">RFC_1123_DATE_FORMAT</td>
201
+ <td class="context-item-name">MAX_HEADER</td>
202
+ <td>=</td>
203
+ <td class="context-item-value">1024 * (80 + 32)</td>
204
+ <td width="3em">&nbsp;</td>
205
+ <td class="context-item-desc">
206
+ This is the maximum header that is allowed before a client is booted. The
207
+ parser detects this, but we&#8217;d also like to do this as well.
208
+
209
+ </td>
210
+ </tr>
211
+ <tr class="top-aligned-row context-row">
212
+ <td class="context-item-name">MAX_BODY</td>
191
213
  <td>=</td>
192
- <td class="context-item-value">&quot;%a, %d %B %Y %H:%M:%S GMT&quot;.freeze</td>
214
+ <td class="context-item-value">MAX_HEADER</td>
193
215
  <td width="3em">&nbsp;</td>
194
216
  <td class="context-item-desc">
195
- Format to generate a correct RFC 1123 date. rdoc for Time is wrong, there
196
- is no httpdate function.
217
+ Maximum request body size before it is moved out of memory and into a
218
+ tempfile for reading.
197
219
 
198
220
  </td>
199
221
  </tr>
@@ -273,6 +295,16 @@ win32)
273
295
  <td>=</td>
274
296
  <td class="context-item-value">&quot;HTTP_X_FORWARDED_FOR&quot;.freeze</td>
275
297
  </tr>
298
+ <tr class="top-aligned-row context-row">
299
+ <td class="context-item-name">HTTP_IF_UNMODIFIED_SINCE</td>
300
+ <td>=</td>
301
+ <td class="context-item-value">&quot;HTTP_IF_UNMODIFIED_SINCE&quot;.freeze</td>
302
+ </tr>
303
+ <tr class="top-aligned-row context-row">
304
+ <td class="context-item-name">HTTP_IF_NONE_MATCH</td>
305
+ <td>=</td>
306
+ <td class="context-item-value">&quot;HTTP_IF_NONE_MATCH&quot;.freeze</td>
307
+ </tr>
276
308
  </table>
277
309
  </div>
278
310
  </div>
@@ -0,0 +1,181 @@
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 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Mongrel::DeflateFilter</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Mongrel::DeflateFilter</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/mongrel/handlers_rb.html">
59
+ lib/mongrel/handlers.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ <a href="HttpHandler.html">
69
+ HttpHandler
70
+ </a>
71
+ </td>
72
+ </tr>
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+
83
+ <div id="description">
84
+ <p>
85
+ When added to a config script (-S in mongrel_rails) it will look at the
86
+ client&#8217;s allowed response types and then gzip compress anything that
87
+ is going out.
88
+ </p>
89
+ <p>
90
+ Valid option is :always_deflate =&gt; false which tells the handler to
91
+ deflate everything even if the client can&#8217;t handle it.
92
+ </p>
93
+
94
+ </div>
95
+
96
+
97
+ </div>
98
+
99
+ <div id="method-list">
100
+ <h3 class="section-bar">Methods</h3>
101
+
102
+ <div class="name-list">
103
+ <a href="#M000094">new</a>&nbsp;&nbsp;
104
+ <a href="#M000095">process</a>&nbsp;&nbsp;
105
+ </div>
106
+ </div>
107
+
108
+ </div>
109
+
110
+
111
+ <!-- if includes -->
112
+
113
+ <div id="section">
114
+
115
+
116
+ <div id="constants-list">
117
+ <h3 class="section-bar">Constants</h3>
118
+
119
+ <div class="name-list">
120
+ <table summary="Constants">
121
+ <tr class="top-aligned-row context-row">
122
+ <td class="context-item-name">HTTP_ACCEPT_ENCODING</td>
123
+ <td>=</td>
124
+ <td class="context-item-value">&quot;HTTP_ACCEPT_ENCODING&quot;</td>
125
+ </tr>
126
+ </table>
127
+ </div>
128
+ </div>
129
+
130
+
131
+
132
+
133
+
134
+
135
+ <!-- if method_list -->
136
+ <div id="methods">
137
+ <h3 class="section-bar">Public Class methods</h3>
138
+
139
+ <div id="method-M000094" class="method-detail">
140
+ <a name="M000094"></a>
141
+
142
+ <div class="method-heading">
143
+ <a href="DeflateFilter.src/M000094.html" target="Code" class="method-signature"
144
+ onclick="popupCode('DeflateFilter.src/M000094.html');return false;">
145
+ <span class="method-name">new</span><span class="method-args">(ops={})</span>
146
+ </a>
147
+ </div>
148
+
149
+ <div class="method-description">
150
+ </div>
151
+ </div>
152
+
153
+ <h3 class="section-bar">Public Instance methods</h3>
154
+
155
+ <div id="method-M000095" class="method-detail">
156
+ <a name="M000095"></a>
157
+
158
+ <div class="method-heading">
159
+ <a href="DeflateFilter.src/M000095.html" target="Code" class="method-signature"
160
+ onclick="popupCode('DeflateFilter.src/M000095.html');return false;">
161
+ <span class="method-name">process</span><span class="method-args">(request, response)</span>
162
+ </a>
163
+ </div>
164
+
165
+ <div class="method-description">
166
+ </div>
167
+ </div>
168
+
169
+
170
+ </div>
171
+
172
+
173
+ </div>
174
+
175
+
176
+ <div id="validator-badges">
177
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
178
+ </div>
179
+
180
+ </body>
181
+ </html>
@@ -0,0 +1,19 @@
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::DeflateFilter)</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 282</span>
14
+ 282: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">ops</span>={})
15
+ 283: <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">ops</span>
16
+ 284: <span class="ruby-ivar">@always_deflate</span> = <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:always_deflate</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword kw">false</span>
17
+ 285: <span class="ruby-keyword kw">end</span></pre>
18
+ </body>
19
+ </html>
@@ -0,0 +1,28 @@
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::DeflateFilter)</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 287</span>
14
+ 287: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process</span>(<span class="ruby-identifier">request</span>, <span class="ruby-identifier">response</span>)
15
+ 288: <span class="ruby-identifier">accepts</span> = <span class="ruby-identifier">request</span>.<span class="ruby-identifier">params</span>[<span class="ruby-constant">HTTP_ACCEPT_ENCODING</span>]
16
+ 289: <span class="ruby-comment cmt"># only process if they support compression</span>
17
+ 290: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@always_deflate</span> <span class="ruby-keyword kw">or</span> (<span class="ruby-identifier">accepts</span> <span class="ruby-keyword kw">and</span> (<span class="ruby-identifier">accepts</span>.<span class="ruby-identifier">include?</span> <span class="ruby-value str">&quot;deflate&quot;</span> <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body_sent</span>))
18
+ 291: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">header</span>[<span class="ruby-value str">&quot;Content-Encoding&quot;</span>] = <span class="ruby-value str">&quot;deflate&quot;</span>
19
+ 292: <span class="ruby-comment cmt"># we can't just rewind the body and gzip it since the body could be an attached file</span>
20
+ 293: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">rewind</span>
21
+ 294: <span class="ruby-identifier">gzout</span> = <span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Zlib</span><span class="ruby-operator">::</span><span class="ruby-constant">Deflate</span>.<span class="ruby-identifier">deflate</span>(<span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">read</span>))
22
+ 295: <span class="ruby-identifier">gzout</span>.<span class="ruby-identifier">rewind</span>
23
+ 296: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">close</span>
24
+ 297: <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span> = <span class="ruby-identifier">gzout</span>
25
+ 298: <span class="ruby-keyword kw">end</span>
26
+ 299: <span class="ruby-keyword kw">end</span></pre>
27
+ </body>
28
+ </html>
@@ -92,6 +92,11 @@ It does a simple protection against going outside it&#8217;s root path by
92
92
  converting all paths to an absolute expanded path, and then making sure
93
93
  that the final expanded path includes the root path. If it doesn&#8217;t
94
94
  than it simply gives a 404.
95
+ </p>
96
+ <p>
97
+ The default content type is &quot;text/plain; charset=ISO-8859-1&quot; but
98
+ you can change it anything you want using the
99
+ DirHandler.default_content_type attribute.
95
100
  </p>
96
101
 
97
102
  </div>
@@ -103,12 +108,12 @@ than it simply gives a 404.
103
108
  <h3 class="section-bar">Methods</h3>
104
109
 
105
110
  <div class="name-list">
106
- <a href="#M000063">add_mime_type</a>&nbsp;&nbsp;
107
- <a href="#M000059">can_serve</a>&nbsp;&nbsp;
108
- <a href="#M000058">new</a>&nbsp;&nbsp;
109
- <a href="#M000062">process</a>&nbsp;&nbsp;
110
- <a href="#M000060">send_dir_listing</a>&nbsp;&nbsp;
111
- <a href="#M000061">send_file</a>&nbsp;&nbsp;
111
+ <a href="#M000061">add_mime_type</a>&nbsp;&nbsp;
112
+ <a href="#M000057">can_serve</a>&nbsp;&nbsp;
113
+ <a href="#M000056">new</a>&nbsp;&nbsp;
114
+ <a href="#M000060">process</a>&nbsp;&nbsp;
115
+ <a href="#M000058">send_dir_listing</a>&nbsp;&nbsp;
116
+ <a href="#M000059">send_file</a>&nbsp;&nbsp;
112
117
  </div>
113
118
  </div>
114
119
 
@@ -146,6 +151,16 @@ than it simply gives a 404.
146
151
 
147
152
  <div class="name-list">
148
153
  <table>
154
+ <tr class="top-aligned-row context-row">
155
+ <td class="context-item-name">default_content_type</td>
156
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
157
+ <td class="context-item-desc"></td>
158
+ </tr>
159
+ <tr class="top-aligned-row context-row">
160
+ <td class="context-item-name">default_content_type</td>
161
+ <td class="context-item-value">&nbsp;[W]&nbsp;</td>
162
+ <td class="context-item-desc"></td>
163
+ </tr>
149
164
  <tr class="top-aligned-row context-row">
150
165
  <td class="context-item-name">path</td>
151
166
  <td class="context-item-value">&nbsp;[R]&nbsp;</td>
@@ -161,12 +176,12 @@ than it simply gives a 404.
161
176
  <div id="methods">
162
177
  <h3 class="section-bar">Public Class methods</h3>
163
178
 
164
- <div id="method-M000063" class="method-detail">
165
- <a name="M000063"></a>
179
+ <div id="method-M000061" class="method-detail">
180
+ <a name="M000061"></a>
166
181
 
167
182
  <div class="method-heading">
168
- <a href="DirHandler.src/M000063.html" target="Code" class="method-signature"
169
- onclick="popupCode('DirHandler.src/M000063.html');return false;">
183
+ <a href="DirHandler.src/M000061.html" target="Code" class="method-signature"
184
+ onclick="popupCode('DirHandler.src/M000061.html');return false;">
170
185
  <span class="method-name">add_mime_type</span><span class="method-args">(extension, type)</span>
171
186
  </a>
172
187
  </div>
@@ -179,12 +194,12 @@ you add any others you&#8217;ll need when serving content.
179
194
  </div>
180
195
  </div>
181
196
 
182
- <div id="method-M000058" class="method-detail">
183
- <a name="M000058"></a>
197
+ <div id="method-M000056" class="method-detail">
198
+ <a name="M000056"></a>
184
199
 
185
200
  <div class="method-heading">
186
- <a href="DirHandler.src/M000058.html" target="Code" class="method-signature"
187
- onclick="popupCode('DirHandler.src/M000058.html');return false;">
201
+ <a href="DirHandler.src/M000056.html" target="Code" class="method-signature"
202
+ onclick="popupCode('DirHandler.src/M000056.html');return false;">
188
203
  <span class="method-name">new</span><span class="method-args">(path, listing_allowed=true, index_html=&quot;index.html&quot;)</span>
189
204
  </a>
190
205
  </div>
@@ -198,12 +213,12 @@ You give it the path to the directory root and an (optional)
198
213
 
199
214
  <h3 class="section-bar">Public Instance methods</h3>
200
215
 
201
- <div id="method-M000059" class="method-detail">
202
- <a name="M000059"></a>
216
+ <div id="method-M000057" class="method-detail">
217
+ <a name="M000057"></a>
203
218
 
204
219
  <div class="method-heading">
205
- <a href="DirHandler.src/M000059.html" target="Code" class="method-signature"
206
- onclick="popupCode('DirHandler.src/M000059.html');return false;">
220
+ <a href="DirHandler.src/M000057.html" target="Code" class="method-signature"
221
+ onclick="popupCode('DirHandler.src/M000057.html');return false;">
207
222
  <span class="method-name">can_serve</span><span class="method-args">(path_info)</span>
208
223
  </a>
209
224
  </div>
@@ -216,12 +231,12 @@ not).
216
231
  </div>
217
232
  </div>
218
233
 
219
- <div id="method-M000062" class="method-detail">
220
- <a name="M000062"></a>
234
+ <div id="method-M000060" class="method-detail">
235
+ <a name="M000060"></a>
221
236
 
222
237
  <div class="method-heading">
223
- <a href="DirHandler.src/M000062.html" target="Code" class="method-signature"
224
- onclick="popupCode('DirHandler.src/M000062.html');return false;">
238
+ <a href="DirHandler.src/M000060.html" target="Code" class="method-signature"
239
+ onclick="popupCode('DirHandler.src/M000060.html');return false;">
225
240
  <span class="method-name">process</span><span class="method-args">(request, response)</span>
226
241
  </a>
227
242
  </div>
@@ -229,17 +244,17 @@ not).
229
244
  <div class="method-description">
230
245
  <p>
231
246
  Process the request to either serve a file or a directory listing if
232
- allowed (based on the listing_allowed paramter to the constructor).
247
+ allowed (based on the listing_allowed parameter to the constructor).
233
248
  </p>
234
249
  </div>
235
250
  </div>
236
251
 
237
- <div id="method-M000060" class="method-detail">
238
- <a name="M000060"></a>
252
+ <div id="method-M000058" class="method-detail">
253
+ <a name="M000058"></a>
239
254
 
240
255
  <div class="method-heading">
241
- <a href="DirHandler.src/M000060.html" target="Code" class="method-signature"
242
- onclick="popupCode('DirHandler.src/M000060.html');return false;">
256
+ <a href="DirHandler.src/M000058.html" target="Code" class="method-signature"
257
+ onclick="popupCode('DirHandler.src/M000058.html');return false;">
243
258
  <span class="method-name">send_dir_listing</span><span class="method-args">(base, dir, response)</span>
244
259
  </a>
245
260
  </div>
@@ -249,19 +264,19 @@ allowed (based on the listing_allowed paramter to the constructor).
249
264
  Returns a simplistic directory listing if they&#8217;re enabled, otherwise
250
265
  a 403. Base is the base URI from the REQUEST_URI, dir is the directory to
251
266
  serve on the file system (comes from <a
252
- href="DirHandler.html#M000059">can_serve</a>()), and response is the <a
267
+ href="DirHandler.html#M000057">can_serve</a>()), and response is the <a
253
268
  href="HttpResponse.html">HttpResponse</a> object to send the results on.
254
269
  </p>
255
270
  </div>
256
271
  </div>
257
272
 
258
- <div id="method-M000061" class="method-detail">
259
- <a name="M000061"></a>
273
+ <div id="method-M000059" class="method-detail">
274
+ <a name="M000059"></a>
260
275
 
261
276
  <div class="method-heading">
262
- <a href="DirHandler.src/M000061.html" target="Code" class="method-signature"
263
- onclick="popupCode('DirHandler.src/M000061.html');return false;">
264
- <span class="method-name">send_file</span><span class="method-args">(req, response, header_only=false)</span>
277
+ <a href="DirHandler.src/M000059.html" target="Code" class="method-signature"
278
+ onclick="popupCode('DirHandler.src/M000059.html');return false;">
279
+ <span class="method-name">send_file</span><span class="method-args">(req_path, request, response, header_only=false)</span>
265
280
  </a>
266
281
  </div>
267
282