mongrel 0.3.13.4 → 1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -33,12 +33,26 @@ module Mongrel
33
33
  # the results into something the Mongrel::HttpResponse
34
34
  # needs.
35
35
  class CampingHandler < Mongrel::HttpHandler
36
+ attr_reader :files
37
+ attr_reader :guard
38
+ @@file_only_methods = ["GET","HEAD"]
39
+
36
40
  def initialize(klass)
41
+ @files = Mongrel::DirHandler.new("/",false)
42
+ @guard = Mutex.new
37
43
  @klass = klass
38
44
  end
39
45
 
40
46
  def process(request, response)
41
- controller = @klass.run(request.body, request.params)
47
+ if response.socket.closed?
48
+ return
49
+ end
50
+
51
+ controller = nil
52
+ @guard.synchronize {
53
+ controller = @klass.run(request.body, request.params)
54
+ }
55
+
42
56
  sendfile, clength = nil
43
57
  response.status = controller.status
44
58
  controller.headers.each do |k, v|
@@ -54,9 +68,8 @@ module Mongrel
54
68
  end
55
69
 
56
70
  if sendfile
57
- response.send_status(File.size(sendfile))
58
- response.send_header
59
- response.send_file(sendfile)
71
+ request.params[Mongrel::Const::PATH_INFO] = sendfile
72
+ @files.process(request, response)
60
73
  elsif controller.body.respond_to? :read
61
74
  response.send_status(clength)
62
75
  response.send_header
@@ -70,6 +70,10 @@ module Mongrel
70
70
  end
71
71
  end
72
72
 
73
+ def remove_pid_file
74
+ File.unlink(@pid_file) if @pid_file and File.exists?(@pid_file)
75
+ end
76
+
73
77
  # Writes the PID file but only if we're on windows.
74
78
  def write_pid_file
75
79
  if RUBY_PLATFORM !~ /mswin/
@@ -248,7 +252,7 @@ module Mongrel
248
252
  GemPlugin::Manager.instance.create(name, ops)
249
253
  end
250
254
 
251
- # Let's you do redirects easily as described in Mongrel::RedirectHandler.
255
+ # Lets you do redirects easily as described in Mongrel::RedirectHandler.
252
256
  # You use it inside the configurator like this:
253
257
  #
254
258
  # redirect("/test", "/to/there") # simple
@@ -302,17 +306,17 @@ module Mongrel
302
306
  # debug "/", what = [:rails]
303
307
  #
304
308
  # And it will only produce the log/mongrel_debug/rails.log file.
305
- # Available options are: :objects, :rails, :files, :threads, :params
309
+ # Available options are: :access, :files, :objects, :threads, :rails
306
310
  #
307
311
  # NOTE: Use [:files] to get accesses dumped to stderr like with WEBrick.
308
- def debug(location, what = [:objects, :rails, :files, :threads, :params])
312
+ def debug(location, what = [:access, :files, :objects, :threads, :rails])
309
313
  require 'mongrel/debug'
310
314
  handlers = {
311
- :files => "/handlers/requestlog::access",
312
- :rails => "/handlers/requestlog::files",
315
+ :access => "/handlers/requestlog::access",
316
+ :files => "/handlers/requestlog::files",
313
317
  :objects => "/handlers/requestlog::objects",
314
318
  :threads => "/handlers/requestlog::threads",
315
- :params => "/handlers/requestlog::params"
319
+ :rails => "/handlers/requestlog::params"
316
320
  }
317
321
 
318
322
  # turn on the debugging infrastructure, and ObjectTracker is a pig
@@ -350,7 +354,7 @@ module Mongrel
350
354
  trap("INT") { log "INT signal received."; stop(false) }
351
355
 
352
356
  # clean up the pid file always
353
- at_exit { File.unlink(@pid_file) if @pid_file and File.exists?(@pid_file) }
357
+ at_exit { remove_pid_file }
354
358
 
355
359
  if RUBY_PLATFORM !~ /mswin/
356
360
  # graceful shutdown
@@ -6,6 +6,7 @@
6
6
 
7
7
  require 'mongrel/stats'
8
8
  require 'zlib'
9
+ require 'yaml'
9
10
 
10
11
 
11
12
  module Mongrel
@@ -23,16 +24,16 @@ module Mongrel
23
24
  attr_reader :request_notify
24
25
  attr_accessor :listener
25
26
 
26
- # This will be called by Mongrel on the *first* (index 0) handler *if* it has
27
- # HttpHandler.request_notify set to *true*. You only get the parameters
28
- # for the request, with the idea that you'd "bound" the beginning of the
29
- # request processing and the first call to process.
27
+ # This will be called by Mongrel if HttpHandler.request_notify set to *true*.
28
+ # You only get the parameters for the request, with the idea that you'd "bound"
29
+ # the beginning of the request processing and the first call to process.
30
30
  def request_begins(params)
31
31
  end
32
32
 
33
33
  # Called by Mongrel for each IO chunk that is received on the request socket
34
34
  # from the client, allowing you to track the progress of the IO and monitor
35
- # the input.
35
+ # the input. This will be called by Mongrel only if HttpHandler.request_notify
36
+ # set to *true*.
36
37
  def request_progress(params, clen, total)
37
38
  end
38
39
 
@@ -101,22 +102,11 @@ module Mongrel
101
102
  # can change it anything you want using the DirHandler.default_content_type
102
103
  # attribute.
103
104
  class DirHandler < HttpHandler
104
- attr_reader :default_content_type
105
- attr_writer :default_content_type
105
+ attr_accessor :default_content_type
106
106
  attr_reader :path
107
107
 
108
- MIME_TYPES = {
109
- ".css" => "text/css",
110
- ".gif" => "image/gif",
111
- ".htm" => "text/html",
112
- ".html" => "text/html",
113
- ".jpeg" => "image/jpeg",
114
- ".jpg" => "image/jpeg",
115
- ".js" => "text/javascript",
116
- ".png" => "image/png",
117
- ".swf" => "application/x-shockwave-flash",
118
- ".txt" => "text/plain"
119
- }
108
+ MIME_TYPES_FILE = "mime_types.yml"
109
+ MIME_TYPES = YAML.load_file(File.join(File.dirname(__FILE__), MIME_TYPES_FILE))
120
110
 
121
111
  ONLY_HEAD_GET="Only HEAD and GET allowed.".freeze
122
112
 
@@ -125,12 +115,11 @@ module Mongrel
125
115
  @path = File.expand_path(path)
126
116
  @listing_allowed=listing_allowed
127
117
  @index_html = index_html
128
- @default_content_type = "text/plain; charset=ISO-8859-1".freeze
118
+ @default_content_type = "application/octet-stream".freeze
129
119
  end
130
120
 
131
121
  # Checks if the given path can be served and returns the full path (or nil if not).
132
122
  def can_serve(path_info)
133
- # TODO: investigate freezing the path_info to prevent double escaping
134
123
  req_path = File.expand_path(File.join(@path,HttpRequest.unescape(path_info)), @path)
135
124
 
136
125
  if req_path.index(@path) == 0 and File.exist? req_path
@@ -227,6 +216,8 @@ module Mongrel
227
216
  dot_at = req_path.rindex('.')
228
217
  if dot_at
229
218
  header[Const::CONTENT_TYPE] = MIME_TYPES[req_path[dot_at .. -1]] || @default_content_type
219
+ else
220
+ header[Const::CONTENT_TYPE] = @default_content_type
230
221
  end
231
222
 
232
223
  # send a status with out content length
@@ -282,6 +273,7 @@ module Mongrel
282
273
  # Valid option is :always_deflate => false which tells the handler to
283
274
  # deflate everything even if the client can't handle it.
284
275
  class DeflateFilter < HttpHandler
276
+ include Zlib
285
277
  HTTP_ACCEPT_ENCODING = "HTTP_ACCEPT_ENCODING"
286
278
 
287
279
  def initialize(ops={})
@@ -294,14 +286,25 @@ module Mongrel
294
286
  # only process if they support compression
295
287
  if @always_deflate or (accepts and (accepts.include? "deflate" and not response.body_sent))
296
288
  response.header["Content-Encoding"] = "deflate"
297
- # we can't just rewind the body and gzip it since the body could be an attached file
298
- response.body.rewind
299
- gzout = StringIO.new(Zlib::Deflate.deflate(response.body.read))
300
- gzout.rewind
301
- response.body.close
302
- response.body = gzout
289
+ response.body = deflate(response.body)
303
290
  end
304
291
  end
292
+
293
+ private
294
+ def deflate(stream)
295
+ deflater = Deflate.new(
296
+ DEFAULT_COMPRESSION,
297
+ # drop the zlib header which causes both Safari and IE to choke
298
+ -MAX_WBITS,
299
+ DEF_MEM_LEVEL,
300
+ DEFAULT_STRATEGY)
301
+
302
+ stream.rewind
303
+ gzout = StringIO.new(deflater.deflate(stream.read, FINISH))
304
+ stream.close
305
+ gzout.rewind
306
+ gzout
307
+ end
305
308
  end
306
309
 
307
310
 
@@ -0,0 +1,615 @@
1
+ ---
2
+ .a: application/octet-stream
3
+ .abc: text/vnd.abc
4
+ .acgi: text/html
5
+ .afl: video/animaflex
6
+ .ai: application/postscript
7
+ .aif: audio/aiff
8
+ .aifc: audio/aiff
9
+ .aiff: audio/aiff
10
+ .aip: text/x-audiosoft-intra
11
+ .ani: application/x-navi-animation
12
+ .aps: application/mime
13
+ .arc: application/octet-stream
14
+ .arj: application/octet-stream
15
+ .art: image/x-jg
16
+ .asf: video/x-ms-asf
17
+ .asm: text/x-asm
18
+ .asp: text/asp
19
+ .asr: video/x-ms-asf
20
+ .asx: video/x-ms-asf
21
+ .atom: application/xml+atom
22
+ .au: audio/basic
23
+ .au: audio/x-au
24
+ .avi: video/avi
25
+ .avs: video/avs-video
26
+ .axs: application/olescript
27
+ .bas: text/plain
28
+ .bcpio: application/x-bcpio
29
+ .bin: application/octet-stream
30
+ .bm: image/bmp
31
+ .bmp: image/bmp
32
+ .boo: application/book
33
+ .book: application/book
34
+ .boz: application/x-bzip2
35
+ .bsh: application/x-bsh
36
+ .bz2: application/x-bzip2
37
+ .bz: application/x-bzip
38
+ .c: text/plain
39
+ .cat: application/octet-stream
40
+ .cc: text/plain
41
+ .ccad: application/clariscad
42
+ .cco: application/x-cocoa
43
+ .cdf: application/cdf
44
+ .cer: application/x-x509-ca-cert
45
+ .cha: application/x-chat
46
+ .chat: application/x-chat
47
+ .class: application/java
48
+ .class: application/octet-stream
49
+ .clp: application/x-msclip
50
+ .cmx: image/x-cmx
51
+ .cod: image/cis-cod
52
+ .com: application/octet-stream
53
+ .com: text/plain
54
+ .conf: text/plain
55
+ .cpio: application/x-cpio
56
+ .cpp: text/x-c
57
+ .cpt: application/x-cpt
58
+ .crd: application/x-mscardfile
59
+ .crl: application/pkcs-crl
60
+ .crl: application/pkix-crl
61
+ .crt: application/x-x509-ca-cert
62
+ .csh: application/x-csh
63
+ .csh: text/x-script.csh
64
+ .css: text/css
65
+ .cxx: text/plain
66
+ .dcr: application/x-director
67
+ .deb: application/octet-stream
68
+ .deepv: application/x-deepv
69
+ .def: text/plain
70
+ .der: application/x-x509-ca-cert
71
+ .dhh: application/david-heinemeier-hansson
72
+ .dif: video/x-dv
73
+ .dir: application/x-director
74
+ .dl: video/dl
75
+ .dll: application/octet-stream
76
+ .dmg: application/octet-stream
77
+ .dms: application/octet-stream
78
+ .doc: application/msword
79
+ .dp: application/commonground
80
+ .drw: application/drafting
81
+ .dump: application/octet-stream
82
+ .dv: video/x-dv
83
+ .dvi: application/x-dvi
84
+ .dwg: application/acad
85
+ .dwg: image/x-dwg
86
+ .dxf: application/dxf
87
+ .dxf: image/x-dwg
88
+ .dxr: application/x-director
89
+ .ear: application/java-archive
90
+ .el: text/x-script.elisp
91
+ .elc: application/x-bytecode.elisp (compiled elisp)
92
+ .elc: application/x-elc
93
+ .env: application/x-envoy
94
+ .eot: application/octet-stream
95
+ .eps: application/postscript
96
+ .es: application/x-esrehber
97
+ .etx: text/x-setext
98
+ .evy: application/envoy
99
+ .evy: application/x-envoy
100
+ .exe: application/octet-stream
101
+ .f77: text/x-fortran
102
+ .f90: text/plain
103
+ .f90: text/x-fortran
104
+ .f: text/x-fortran
105
+ .fdf: application/vnd.fdf
106
+ .fif: application/fractals
107
+ .fif: image/fif
108
+ .fli: video/fli
109
+ .fli: video/x-fli
110
+ .flo: image/florian
111
+ .flr: x-world/x-vrml
112
+ .flv: video/x-flv
113
+ .flx: text/vnd.fmi.flexstor
114
+ .fmf: video/x-atomic3d-feature
115
+ .for: text/plain
116
+ .for: text/x-fortran
117
+ .fpx: image/vnd.fpx
118
+ .fpx: image/vnd.net-fpx
119
+ .frl: application/freeloader
120
+ .funk: audio/make
121
+ .g3: image/g3fax
122
+ .g: text/plain
123
+ .gif: image/gif
124
+ .gl: video/gl
125
+ .gl: video/x-gl
126
+ .gsd: audio/x-gsm
127
+ .gsm: audio/x-gsm
128
+ .gsp: application/x-gsp
129
+ .gss: application/x-gss
130
+ .gtar: application/x-gtar
131
+ .gz: application/x-compressed
132
+ .gzip: application/x-gzip
133
+ .h: text/plain
134
+ .hdf: application/x-hdf
135
+ .help: application/x-helpfile
136
+ .hgl: application/vnd.hp-hpgl
137
+ .hh: text/plain
138
+ .hlb: text/x-script
139
+ .hlp: application/hlp
140
+ .hpg: application/vnd.hp-hpgl
141
+ .hpgl: application/vnd.hp-hpgl
142
+ .hqx: application/binhex
143
+ .hta: application/hta
144
+ .htc: text/x-component
145
+ .htm: text/html
146
+ .html: text/html
147
+ .htmls: text/html
148
+ .htt: text/webviewhtml
149
+ .htx: text/html
150
+ .ico: image/x-icon
151
+ .idc: text/plain
152
+ .ief: image/ief
153
+ .iefs: image/ief
154
+ .iges: application/iges
155
+ .igs: application/iges
156
+ .iii: application/x-iphone
157
+ .ima: application/x-ima
158
+ .imap: application/x-httpd-imap
159
+ .img: application/octet-stream
160
+ .inf: application/inf
161
+ .ins: application/x-internet-signup
162
+ .ins: application/x-internett-signup
163
+ .ip: application/x-ip2
164
+ .iso: application/octet-stream
165
+ .isp: application/x-internet-signup
166
+ .isu: video/x-isvideo
167
+ .it: audio/it
168
+ .iv: application/x-inventor
169
+ .ivr: i-world/i-vrml
170
+ .ivy: application/x-livescreen
171
+ .jam: audio/x-jam
172
+ .jar: application/java-archive
173
+ .jardiff: application/x-java-archive-diff
174
+ .jav: text/plain
175
+ .jav: text/x-java-source
176
+ .java: text/plain
177
+ .java: text/x-java-source
178
+ .jcm: application/x-java-commerce
179
+ .jfif-tbnl: image/jpeg
180
+ .jfif: image/jpeg
181
+ .jfif: image/pipeg
182
+ .jfif: image/pjpeg
183
+ .jng: image/x-jng
184
+ .jnlp: application/x-java-jnlp-file
185
+ .jpe: image/jpeg
186
+ .jpeg: image/jpeg
187
+ .jpg: image/jpeg
188
+ .jps: image/x-jps
189
+ .js: application/x-javascript
190
+ .js: text/javascript
191
+ .jut: image/jutvision
192
+ .kar: audio/midi
193
+ .kar: music/x-karaoke
194
+ .ksh: application/x-ksh
195
+ .ksh: text/x-script.ksh
196
+ .la: audio/nspaudio
197
+ .la: audio/x-nspaudio
198
+ .lam: audio/x-liveaudio
199
+ .latex: application/x-latex
200
+ .lha: application/lha
201
+ .lha: application/octet-stream
202
+ .lha: application/x-lha
203
+ .lhx: application/octet-stream
204
+ .list: text/plain
205
+ .lma: audio/nspaudio
206
+ .lma: audio/x-nspaudio
207
+ .log: text/plain
208
+ .lsf: video/x-la-asf
209
+ .lsp: application/x-lisp
210
+ .lsp: text/x-script.lisp
211
+ .lst: text/plain
212
+ .lsx: text/x-la-asf
213
+ .lsx: video/x-la-asf
214
+ .ltx: application/x-latex
215
+ .lzh: application/octet-stream
216
+ .lzh: application/x-lzh
217
+ .lzx: application/lzx
218
+ .lzx: application/octet-stream
219
+ .lzx: application/x-lzx
220
+ .m13: application/x-msmediaview
221
+ .m14: application/x-msmediaview
222
+ .m1v: video/mpeg
223
+ .m2a: audio/mpeg
224
+ .m2v: video/mpeg
225
+ .m3u: audio/x-mpegurl
226
+ .m: text/x-m
227
+ .man: application/x-troff-man
228
+ .map: application/x-navimap
229
+ .mar: text/plain
230
+ .mbd: application/mbedlet
231
+ .mc: application/x-magic-cap-package-1.0
232
+ .mcd: application/mcad
233
+ .mcd: application/x-mathcad
234
+ .mcf: image/vasa
235
+ .mcf: text/mcf
236
+ .mcp: application/netmc
237
+ .mdb: application/x-msaccess
238
+ .me: application/x-troff-me
239
+ .mht: message/rfc822
240
+ .mhtml: message/rfc822
241
+ .mid: audio/mid
242
+ .mid: audio/midi
243
+ .mid: audio/x-mid
244
+ .mid: audio/x-midi
245
+ .midi: audio/midi
246
+ .midi: audio/x-mid
247
+ .midi: audio/x-midi
248
+ .mif: application/x-frame
249
+ .mif: application/x-mif
250
+ .mime: message/rfc822
251
+ .mime: www/mime
252
+ .mjf: audio/x-vnd.audioexplosion.mjuicemediafile
253
+ .mjpg: video/x-motion-jpeg
254
+ .mm: application/base64
255
+ .mm: application/x-meme
256
+ .mme: application/base64
257
+ .mml: text/mathml
258
+ .mng: video/x-mng
259
+ .mod: audio/mod
260
+ .moov: video/quicktime
261
+ .mov: video/quicktime
262
+ .movie: video/x-sgi-movie
263
+ .mp2: audio/mpeg
264
+ .mp3: audio/mpeg
265
+ .mpa: audio/mpeg
266
+ .mpc: application/x-project
267
+ .mpe: video/mpeg
268
+ .mpeg: video/mpeg
269
+ .mpg: video/mpeg
270
+ .mpga: audio/mpeg
271
+ .mpp: application/vnd.ms-project
272
+ .mpt: application/x-project
273
+ .mpv2: video/mpeg
274
+ .mpv: application/x-project
275
+ .mpx: application/x-project
276
+ .mrc: application/marc
277
+ .ms: application/x-troff-ms
278
+ .msi: application/octet-stream
279
+ .msm: application/octet-stream
280
+ .msp: application/octet-stream
281
+ .mv: video/x-sgi-movie
282
+ .mvb: application/x-msmediaview
283
+ .my: audio/make
284
+ .mzz: application/x-vnd.audioexplosion.mzz
285
+ .nap: image/naplps
286
+ .naplps: image/naplps
287
+ .nc: application/x-netcdf
288
+ .ncm: application/vnd.nokia.configuration-message
289
+ .nif: image/x-niff
290
+ .niff: image/x-niff
291
+ .nix: application/x-mix-transfer
292
+ .nsc: application/x-conference
293
+ .nvd: application/x-navidoc
294
+ .nws: message/rfc822
295
+ .o: application/octet-stream
296
+ .oda: application/oda
297
+ .omc: application/x-omc
298
+ .omcd: application/x-omcdatamaker
299
+ .omcr: application/x-omcregerator
300
+ .p10: application/pkcs10
301
+ .p10: application/x-pkcs10
302
+ .p12: application/pkcs-12
303
+ .p12: application/x-pkcs12
304
+ .p7a: application/x-pkcs7-signature
305
+ .p7b: application/x-pkcs7-certificates
306
+ .p7c: application/pkcs7-mime
307
+ .p7c: application/x-pkcs7-mime
308
+ .p7m: application/pkcs7-mime
309
+ .p7m: application/x-pkcs7-mime
310
+ .p7r: application/x-pkcs7-certreqresp
311
+ .p7s: application/pkcs7-signature
312
+ .p7s: application/x-pkcs7-signature
313
+ .p: text/x-pascal
314
+ .part: application/pro_eng
315
+ .pas: text/pascal
316
+ .pbm: image/x-portable-bitmap
317
+ .pcl: application/vnd.hp-pcl
318
+ .pcl: application/x-pcl
319
+ .pct: image/x-pict
320
+ .pcx: image/x-pcx
321
+ .pdb: application/x-pilot
322
+ .pdf: application/pdf
323
+ .pem: application/x-x509-ca-cert
324
+ .pfunk: audio/make
325
+ .pfunk: audio/make.my.funk
326
+ .pfx: application/x-pkcs12
327
+ .pgm: image/x-portable-graymap
328
+ .pgm: image/x-portable-greymap
329
+ .pic: image/pict
330
+ .pict: image/pict
331
+ .pkg: application/x-newton-compatible-pkg
332
+ .pko: application/vnd.ms-pki.pko
333
+ .pko: application/ynd.ms-pkipko
334
+ .pl: application/x-perl
335
+ .pl: text/plain
336
+ .pl: text/x-script.perl
337
+ .plx: application/x-pixclscript
338
+ .pm4: application/x-pagemaker
339
+ .pm5: application/x-pagemaker
340
+ .pm: application/x-perl
341
+ .pm: image/x-xpixmap
342
+ .pm: text/x-script.perl-module
343
+ .pma: application/x-perfmon
344
+ .pmc: application/x-perfmon
345
+ .pml: application/x-perfmon
346
+ .pmr: application/x-perfmon
347
+ .pmw: application/x-perfmon
348
+ .png: image/png
349
+ .pnm: application/x-portable-anymap
350
+ .pnm: image/x-portable-anymap
351
+ .pot,: application/vnd.ms-powerpoint
352
+ .pot: application/mspowerpoint
353
+ .pot: application/vnd.ms-powerpoint
354
+ .pov: model/x-pov
355
+ .ppa: application/vnd.ms-powerpoint
356
+ .ppm: image/x-portable-pixmap
357
+ .pps: application/mspowerpoint
358
+ .ppt: application/mspowerpoint
359
+ .ppz: application/mspowerpoint
360
+ .prc: application/x-pilot
361
+ .pre: application/x-freelance
362
+ .prf: application/pics-rules
363
+ .prt: application/pro_eng
364
+ .ps: application/postscript
365
+ .psd: application/octet-stream
366
+ .pub: application/x-mspublisher
367
+ .pvu: paleovu/x-pv
368
+ .pwz: application/vnd.ms-powerpoint
369
+ .py: text/x-script.phyton
370
+ .pyc: applicaiton/x-bytecode.python
371
+ .qcp: audio/vnd.qcelp
372
+ .qd3: x-world/x-3dmf
373
+ .qd3d: x-world/x-3dmf
374
+ .qif: image/x-quicktime
375
+ .qt: video/quicktime
376
+ .qtc: video/x-qtc
377
+ .qti: image/x-quicktime
378
+ .qtif: image/x-quicktime
379
+ .ra: audio/x-pn-realaudio
380
+ .ra: audio/x-pn-realaudio-plugin
381
+ .ra: audio/x-realaudio
382
+ .ram: audio/x-pn-realaudio
383
+ .rar: application/x-rar-compressed
384
+ .ras: application/x-cmu-raster
385
+ .ras: image/cmu-raster
386
+ .ras: image/x-cmu-raster
387
+ .rast: image/cmu-raster
388
+ .rexx: text/x-script.rexx
389
+ .rf: image/vnd.rn-realflash
390
+ .rgb: image/x-rgb
391
+ .rm: application/vnd.rn-realmedia
392
+ .rm: audio/x-pn-realaudio
393
+ .rmi: audio/mid
394
+ .rmm: audio/x-pn-realaudio
395
+ .rmp: audio/x-pn-realaudio
396
+ .rmp: audio/x-pn-realaudio-plugin
397
+ .rng: application/ringing-tones
398
+ .rng: application/vnd.nokia.ringing-tone
399
+ .rnx: application/vnd.rn-realplayer
400
+ .roff: application/x-troff
401
+ .rp: image/vnd.rn-realpix
402
+ .rpm: application/x-redhat-package-manager
403
+ .rpm: audio/x-pn-realaudio-plugin
404
+ .rss: text/xml
405
+ .rt: text/richtext
406
+ .rt: text/vnd.rn-realtext
407
+ .rtf: application/rtf
408
+ .rtf: application/x-rtf
409
+ .rtf: text/richtext
410
+ .rtx: application/rtf
411
+ .rtx: text/richtext
412
+ .run: application/x-makeself
413
+ .rv: video/vnd.rn-realvideo
414
+ .s3m: audio/s3m
415
+ .s: text/x-asm
416
+ .saveme: application/octet-stream
417
+ .sbk: application/x-tbook
418
+ .scd: application/x-msschedule
419
+ .scm: application/x-lotusscreencam
420
+ .scm: text/x-script.guile
421
+ .scm: text/x-script.scheme
422
+ .scm: video/x-scm
423
+ .sct: text/scriptlet
424
+ .sdml: text/plain
425
+ .sdp: application/sdp
426
+ .sdp: application/x-sdp
427
+ .sdr: application/sounder
428
+ .sea: application/sea
429
+ .sea: application/x-sea
430
+ .set: application/set
431
+ .setpay: application/set-payment-initiation
432
+ .setreg: application/set-registration-initiation
433
+ .sgm: text/sgml
434
+ .sgm: text/x-sgml
435
+ .sgml: text/sgml
436
+ .sgml: text/x-sgml
437
+ .sh: application/x-bsh
438
+ .sh: application/x-sh
439
+ .sh: application/x-shar
440
+ .sh: text/x-script.sh
441
+ .shar: application/x-bsh
442
+ .shar: application/x-shar
443
+ .shtml: text/html
444
+ .shtml: text/x-server-parsed-html
445
+ .sid: audio/x-psid
446
+ .sit: application/x-sit
447
+ .sit: application/x-stuffit
448
+ .skd: application/x-koan
449
+ .skm: application/x-koan
450
+ .skp: application/x-koan
451
+ .skt: application/x-koan
452
+ .sl: application/x-seelogo
453
+ .smi: application/smil
454
+ .smil: application/smil
455
+ .snd: audio/basic
456
+ .snd: audio/x-adpcm
457
+ .sol: application/solids
458
+ .spc: application/x-pkcs7-certificates
459
+ .spc: text/x-speech
460
+ .spl: application/futuresplash
461
+ .spr: application/x-sprite
462
+ .sprite: application/x-sprite
463
+ .src: application/x-wais-source
464
+ .ssi: text/x-server-parsed-html
465
+ .ssm: application/streamingmedia
466
+ .sst: application/vnd.ms-pki.certstore
467
+ .sst: application/vnd.ms-pkicertstore
468
+ .step: application/step
469
+ .stl: application/sla
470
+ .stl: application/vnd.ms-pki.stl
471
+ .stl: application/vnd.ms-pkistl
472
+ .stl: application/x-navistyle
473
+ .stm: text/html
474
+ .stp: application/step
475
+ .sv4cpio: application/x-sv4cpio
476
+ .sv4crc: application/x-sv4crc
477
+ .svf: image/vnd.dwg
478
+ .svf: image/x-dwg
479
+ .svg: image/svg+xml
480
+ .svr: application/x-world
481
+ .svr: x-world/x-svr
482
+ .swf: application/x-shockwave-flash
483
+ .t: application/x-troff
484
+ .talk: text/x-speech
485
+ .tar: application/x-tar
486
+ .tbk: application/toolbook
487
+ .tbk: application/x-tbook
488
+ .tcl: application/x-tcl
489
+ .tcl: text/x-script.tcl
490
+ .tcsh: text/x-script.tcsh
491
+ .tex: application/x-tex
492
+ .texi: application/x-texinfo
493
+ .texinfo: application/x-texinfo
494
+ .text: application/plain
495
+ .text: text/plain
496
+ .tgz: application/gnutar
497
+ .tgz: application/x-compressed
498
+ .tif: image/tiff
499
+ .tiff: image/tiff
500
+ .tk: application/x-tcl
501
+ .tr: application/x-troff
502
+ .trm: application/x-msterminal
503
+ .tsi: audio/tsp-audio
504
+ .tsp: application/dsptype
505
+ .tsp: audio/tsplayer
506
+ .tsv: text/tab-separated-values
507
+ .turbot: image/florian
508
+ .txt: text/plain
509
+ .uil: text/x-uil
510
+ .uls: text/iuls
511
+ .uni: text/uri-list
512
+ .unis: text/uri-list
513
+ .unv: application/i-deas
514
+ .uri: text/uri-list
515
+ .uris: text/uri-list
516
+ .ustar: application/x-ustar
517
+ .ustar: multipart/x-ustar
518
+ .uu: application/octet-stream
519
+ .uu: text/x-uuencode
520
+ .uue: text/x-uuencode
521
+ .vcd: application/x-cdlink
522
+ .vcf: text/x-vcard
523
+ .vcs: text/x-vcalendar
524
+ .vda: application/vda
525
+ .vdo: video/vdo
526
+ .vew: application/groupwise
527
+ .viv: video/vivo
528
+ .viv: video/vnd.vivo
529
+ .vivo: video/vivo
530
+ .vivo: video/vnd.vivo
531
+ .vmd: application/vocaltec-media-desc
532
+ .vmf: application/vocaltec-media-file
533
+ .voc: audio/voc
534
+ .voc: audio/x-voc
535
+ .vos: video/vosaic
536
+ .vox: audio/voxware
537
+ .vqe: audio/x-twinvq-plugin
538
+ .vqf: audio/x-twinvq
539
+ .vql: audio/x-twinvq-plugin
540
+ .vrml: application/x-vrml
541
+ .vrml: model/vrml
542
+ .vrml: x-world/x-vrml
543
+ .vrt: x-world/x-vrt
544
+ .vsd: application/x-visio
545
+ .vst: application/x-visio
546
+ .vsw: application/x-visio
547
+ .w60: application/wordperfect6.0
548
+ .w61: application/wordperfect6.1
549
+ .w6w: application/msword
550
+ .war: application/java-archive
551
+ .wav: audio/wav
552
+ .wav: audio/x-wav
553
+ .wb1: application/x-qpro
554
+ .wbmp: image/vnd.wap.wbmp
555
+ .wbmp: image/vnd.wap.wbmp
556
+ .wcm: application/vnd.ms-works
557
+ .wdb: application/vnd.ms-works
558
+ .web: application/vnd.xara
559
+ .wiz: application/msword
560
+ .wk1: application/x-123
561
+ .wks: application/vnd.ms-works
562
+ .wmf: application/x-msmetafile
563
+ .wmf: windows/metafile
564
+ .wml: text/vnd.wap.wml
565
+ .wmlc: application/vnd.wap.wmlc
566
+ .wmls: text/vnd.wap.wmlscript
567
+ .wmlsc: application/vnd.wap.wmlscriptc
568
+ .wmv: video/x-ms-wmv
569
+ .word: application/msword
570
+ .wp5: application/wordperfect
571
+ .wp6: application/wordperfect
572
+ .wp: application/wordperfect
573
+ .wpd: application/wordperfect
574
+ .wps: application/vnd.ms-works
575
+ .wq1: application/x-lotus
576
+ .wri: application/mswrite
577
+ .wrl: application/x-world
578
+ .wsc: text/scriplet
579
+ .wsrc: application/x-wais-source
580
+ .wtk: application/x-wintalk
581
+ .x-png: image/png
582
+ .xaf: x-world/x-vrml
583
+ .xbm: image/xbm
584
+ .xdr: video/x-amt-demorun
585
+ .xgz: xgl/drawing
586
+ .xhtml: application/xhtml+xml
587
+ .xif: image/vnd.xiff
588
+ .xl: application/excel
589
+ .xla: application/excel
590
+ .xlb: application/excel
591
+ .xlc: application/excel
592
+ .xld: application/excel
593
+ .xlk: application/excel
594
+ .xll: application/excel
595
+ .xlm: application/excel
596
+ .xls: application/excel
597
+ .xlt: application/excel
598
+ .xlv: application/excel
599
+ .xlw: application/excel
600
+ .xm: audio/xm
601
+ .xml: text/xml
602
+ .xmz: xgl/movie
603
+ .xof: x-world/x-vrml
604
+ .xpi: application/x-xpinstall
605
+ .xpix: application/x-vnd.ls-xpix
606
+ .xpm: image/x-xpixmap
607
+ .xpm: image/xpm
608
+ .xsr: video/x-amt-showrun
609
+ .xwd: image/x-xwd
610
+ .xwd: image/x-xwindowdump
611
+ .xyz: chemical/x-pdb
612
+ .z: application/x-compressed
613
+ .zip: application/zip
614
+ .zoo: application/octet-stream
615
+ .zsh: text/x-script.zsh