mongrel 0.3.13 → 0.3.13.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. data/Rakefile +1 -1
  2. data/bin/mongrel_rails +1 -1
  3. data/doc/rdoc/classes/Mongrel.html +1 -0
  4. data/doc/rdoc/classes/Mongrel/CGIWrapper.html +49 -49
  5. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000098.html +11 -21
  6. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000099.html +34 -14
  7. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000100.html +21 -12
  8. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000101.html +14 -5
  9. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000102.html +12 -5
  10. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000103.html +5 -5
  11. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000104.html +5 -6
  12. data/doc/rdoc/classes/Mongrel/{URIClassifier.src/M000088.html → CGIWrapper.src/M000105.html} +5 -5
  13. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000106.html +19 -0
  14. data/doc/rdoc/classes/Mongrel/Camping.html +5 -5
  15. data/doc/rdoc/classes/Mongrel/Camping.src/{M000046.html → M000047.html} +0 -0
  16. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.html +10 -10
  17. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000048.html +5 -38
  18. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000049.html +51 -0
  19. data/doc/rdoc/classes/Mongrel/Command/Base.html +65 -65
  20. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000025.html +11 -29
  21. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000026.html +29 -5
  22. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000027.html +5 -5
  23. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000028.html +5 -5
  24. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000029.html +5 -5
  25. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000030.html +5 -9
  26. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000031.html +9 -5
  27. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000032.html +5 -5
  28. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000033.html +5 -5
  29. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000034.html +5 -11
  30. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000035.html +11 -11
  31. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000036.html +11 -5
  32. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000037.html +18 -0
  33. data/doc/rdoc/classes/Mongrel/Command/Registry.html +15 -15
  34. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000038.html +7 -12
  35. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000039.html +12 -37
  36. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000040.html +50 -0
  37. data/doc/rdoc/classes/Mongrel/Configurator.html +143 -107
  38. data/doc/rdoc/classes/Mongrel/Configurator.src/M000107.html +16 -7
  39. data/doc/rdoc/classes/Mongrel/Configurator.src/M000108.html +18 -7
  40. data/doc/rdoc/classes/Mongrel/Configurator.src/M000109.html +7 -10
  41. data/doc/rdoc/classes/Mongrel/Configurator.src/M000110.html +7 -5
  42. data/doc/rdoc/classes/Mongrel/Configurator.src/M000111.html +10 -21
  43. data/doc/rdoc/classes/Mongrel/Configurator.src/M000112.html +5 -6
  44. data/doc/rdoc/classes/Mongrel/Configurator.src/M000113.html +21 -17
  45. data/doc/rdoc/classes/Mongrel/Configurator.src/M000114.html +6 -20
  46. data/doc/rdoc/classes/Mongrel/Configurator.src/M000115.html +17 -5
  47. data/doc/rdoc/classes/Mongrel/Configurator.src/M000116.html +20 -11
  48. data/doc/rdoc/classes/Mongrel/Configurator.src/M000117.html +5 -6
  49. data/doc/rdoc/classes/Mongrel/Configurator.src/M000118.html +11 -9
  50. data/doc/rdoc/classes/Mongrel/Configurator.src/M000119.html +6 -12
  51. data/doc/rdoc/classes/Mongrel/Configurator.src/M000120.html +5 -5
  52. data/doc/rdoc/classes/Mongrel/Configurator.src/M000121.html +9 -22
  53. data/doc/rdoc/classes/Mongrel/Configurator.src/M000122.html +12 -5
  54. data/doc/rdoc/classes/Mongrel/Configurator.src/M000123.html +5 -20
  55. data/doc/rdoc/classes/Mongrel/Configurator.src/M000124.html +22 -5
  56. data/doc/rdoc/classes/Mongrel/Configurator.src/M000125.html +18 -0
  57. data/doc/rdoc/classes/Mongrel/Configurator.src/M000126.html +33 -0
  58. data/doc/rdoc/classes/Mongrel/Configurator.src/M000127.html +18 -0
  59. data/doc/rdoc/classes/Mongrel/Const.html +6 -1
  60. data/doc/rdoc/classes/Mongrel/DeflateFilter.html +10 -10
  61. data/doc/rdoc/classes/Mongrel/DeflateFilter.src/{M000094.html → M000096.html} +5 -5
  62. data/doc/rdoc/classes/Mongrel/DeflateFilter.src/{M000095.html → M000097.html} +14 -14
  63. data/doc/rdoc/classes/Mongrel/DirHandler.html +31 -31
  64. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000057.html +8 -30
  65. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000058.html +30 -29
  66. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000059.html +29 -50
  67. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000060.html +50 -26
  68. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000061.html +26 -5
  69. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000062.html +18 -0
  70. data/doc/rdoc/classes/Mongrel/Error404Handler.html +10 -10
  71. data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000125.html → M000128.html} +4 -4
  72. data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000126.html → M000129.html} +4 -4
  73. data/doc/rdoc/classes/Mongrel/HeaderOut.html +10 -10
  74. data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000070.html +5 -5
  75. data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000071.html +18 -0
  76. data/doc/rdoc/classes/Mongrel/HttpHandler.html +31 -9
  77. data/doc/rdoc/classes/Mongrel/{URIClassifier.src/M000089.html → HttpHandler.src/M000076.html} +4 -5
  78. data/doc/rdoc/classes/Mongrel/HttpHandler.src/{M000075.html → M000077.html} +3 -3
  79. data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.html +30 -15
  80. data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000022.html +4 -6
  81. data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000023.html +6 -4
  82. data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000024.html +17 -0
  83. data/doc/rdoc/classes/Mongrel/HttpParser.html +35 -35
  84. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000050.html +5 -6
  85. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000051.html +7 -7
  86. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000052.html +7 -37
  87. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000053.html +37 -5
  88. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000054.html +5 -5
  89. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000055.html +5 -6
  90. data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000049.html → M000056.html} +6 -6
  91. data/doc/rdoc/classes/Mongrel/HttpRequest.html +20 -20
  92. data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000130.html → M000135.html} +38 -38
  93. data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000131.html → M000136.html} +6 -6
  94. data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000132.html → M000137.html} +6 -6
  95. data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000133.html → M000138.html} +18 -18
  96. data/doc/rdoc/classes/Mongrel/HttpResponse.html +61 -61
  97. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000078.html +12 -12
  98. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000079.html +7 -9
  99. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000080.html +12 -9
  100. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000081.html +9 -9
  101. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000082.html +9 -18
  102. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000083.html +9 -8
  103. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000084.html +18 -7
  104. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000085.html +8 -7
  105. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000086.html +7 -7
  106. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000087.html +7 -5
  107. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000088.html +20 -0
  108. data/doc/rdoc/classes/Mongrel/{HeaderOut.src/M000069.html → HttpResponse.src/M000089.html} +5 -5
  109. data/doc/rdoc/classes/Mongrel/HttpServer.html +38 -38
  110. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000063.html +12 -70
  111. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000064.html +76 -13
  112. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000065.html +13 -50
  113. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000066.html +50 -21
  114. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000067.html +20 -4
  115. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000068.html +5 -9
  116. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000069.html +22 -0
  117. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.html +15 -15
  118. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000041.html +26 -12
  119. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000042.html +12 -13
  120. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000043.html +26 -0
  121. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.html +15 -15
  122. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000044.html +9 -38
  123. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000045.html +38 -10
  124. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000046.html +23 -0
  125. data/doc/rdoc/classes/Mongrel/RedirectHandler.html +187 -0
  126. data/doc/rdoc/classes/Mongrel/RedirectHandler.src/M000133.html +22 -0
  127. data/doc/rdoc/classes/Mongrel/RedirectHandler.src/M000134.html +27 -0
  128. data/doc/rdoc/classes/Mongrel/StatisticsFilter.html +16 -16
  129. data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000127.html → M000130.html} +10 -10
  130. data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000128.html → M000131.html} +10 -10
  131. data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000129.html → M000132.html} +4 -4
  132. data/doc/rdoc/classes/Mongrel/StatusHandler.html +20 -20
  133. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000072.html +5 -11
  134. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000073.html +11 -29
  135. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000074.html +29 -7
  136. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000075.html +20 -0
  137. data/doc/rdoc/classes/Mongrel/URIClassifier.html +30 -30
  138. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000090.html +5 -26
  139. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000091.html +5 -38
  140. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000092.html +18 -15
  141. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000093.html +25 -57
  142. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000094.html +36 -0
  143. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000095.html +83 -0
  144. data/doc/rdoc/classes/RequestLog/Access.html +5 -5
  145. data/doc/rdoc/classes/RequestLog/Access.src/{M000134.html → M000139.html} +0 -0
  146. data/doc/rdoc/classes/RequestLog/Files.html +5 -5
  147. data/doc/rdoc/classes/RequestLog/Files.src/{M000135.html → M000140.html} +0 -0
  148. data/doc/rdoc/classes/RequestLog/Objects.html +5 -5
  149. data/doc/rdoc/classes/RequestLog/Objects.src/{M000137.html → M000142.html} +0 -0
  150. data/doc/rdoc/classes/RequestLog/Params.html +5 -5
  151. data/doc/rdoc/classes/RequestLog/Params.src/{M000138.html → M000143.html} +0 -0
  152. data/doc/rdoc/classes/RequestLog/Threads.html +5 -5
  153. data/doc/rdoc/classes/RequestLog/Threads.src/{M000136.html → M000141.html} +0 -0
  154. data/doc/rdoc/created.rid +1 -1
  155. data/doc/rdoc/files/ext/http11/http11_c.html +1 -1
  156. data/doc/rdoc/files/lib/mongrel/handlers_rb.html +1 -1
  157. data/doc/rdoc/files/lib/mongrel_rb.html +1 -1
  158. data/doc/rdoc/fr_class_index.html +1 -0
  159. data/doc/rdoc/fr_method_index.html +124 -119
  160. data/examples/simpletest.rb +2 -0
  161. data/ext/http11/http11.c +1 -1
  162. data/lib/mongrel.rb +30 -5
  163. data/lib/mongrel/handlers.rb +57 -2
  164. data/test/test_redirect_handler.rb +40 -0
  165. metadata +47 -38
  166. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000096.html +0 -24
  167. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000097.html +0 -47
  168. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000047.html +0 -18
  169. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000024.html +0 -24
  170. data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000037.html +0 -20
  171. data/doc/rdoc/classes/Mongrel/Configurator.src/M000105.html +0 -29
  172. data/doc/rdoc/classes/Mongrel/Configurator.src/M000106.html +0 -31
  173. data/doc/rdoc/classes/Mongrel/DirHandler.src/M000056.html +0 -21
  174. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000076.html +0 -25
  175. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000077.html +0 -20
  176. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000062.html +0 -25
  177. data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000040.html +0 -39
  178. data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000043.html +0 -22
  179. data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000071.html +0 -18
@@ -94,7 +94,7 @@ The parameter to start is the response code&#8212;which <a
94
94
  href="../Mongrel.html">Mongrel</a> will translate for you based on
95
95
  HTTP_STATUS_CODES. The head parameter is how you write custom headers. The
96
96
  out parameter is where you write your body. The default status code for <a
97
- href="HttpResponse.html#M000077">HttpResponse.start</a> is 200 so the above
97
+ href="HttpResponse.html#M000079">HttpResponse.start</a> is 200 so the above
98
98
  example is redundant.
99
99
  </p>
100
100
  <p>
@@ -131,18 +131,18 @@ will write this for you based on the out length.
131
131
  <h3 class="section-bar">Methods</h3>
132
132
 
133
133
  <div class="name-list">
134
- <a href="#M000087">done</a>&nbsp;&nbsp;
135
- <a href="#M000086">done=</a>&nbsp;&nbsp;
136
- <a href="#M000085">finished</a>&nbsp;&nbsp;
137
- <a href="#M000076">new</a>&nbsp;&nbsp;
138
- <a href="#M000078">reset</a>&nbsp;&nbsp;
139
- <a href="#M000081">send_body</a>&nbsp;&nbsp;
140
- <a href="#M000082">send_file</a>&nbsp;&nbsp;
141
- <a href="#M000080">send_header</a>&nbsp;&nbsp;
142
- <a href="#M000079">send_status</a>&nbsp;&nbsp;
143
- <a href="#M000083">socket_error</a>&nbsp;&nbsp;
144
- <a href="#M000077">start</a>&nbsp;&nbsp;
145
- <a href="#M000084">write</a>&nbsp;&nbsp;
134
+ <a href="#M000089">done</a>&nbsp;&nbsp;
135
+ <a href="#M000088">done=</a>&nbsp;&nbsp;
136
+ <a href="#M000087">finished</a>&nbsp;&nbsp;
137
+ <a href="#M000078">new</a>&nbsp;&nbsp;
138
+ <a href="#M000080">reset</a>&nbsp;&nbsp;
139
+ <a href="#M000083">send_body</a>&nbsp;&nbsp;
140
+ <a href="#M000084">send_file</a>&nbsp;&nbsp;
141
+ <a href="#M000082">send_header</a>&nbsp;&nbsp;
142
+ <a href="#M000081">send_status</a>&nbsp;&nbsp;
143
+ <a href="#M000085">socket_error</a>&nbsp;&nbsp;
144
+ <a href="#M000079">start</a>&nbsp;&nbsp;
145
+ <a href="#M000086">write</a>&nbsp;&nbsp;
146
146
  </div>
147
147
  </div>
148
148
 
@@ -217,12 +217,12 @@ will write this for you based on the out length.
217
217
  <div id="methods">
218
218
  <h3 class="section-bar">Public Class methods</h3>
219
219
 
220
- <div id="method-M000076" class="method-detail">
221
- <a name="M000076"></a>
220
+ <div id="method-M000078" class="method-detail">
221
+ <a name="M000078"></a>
222
222
 
223
223
  <div class="method-heading">
224
- <a href="HttpResponse.src/M000076.html" target="Code" class="method-signature"
225
- onclick="popupCode('HttpResponse.src/M000076.html');return false;">
224
+ <a href="HttpResponse.src/M000078.html" target="Code" class="method-signature"
225
+ onclick="popupCode('HttpResponse.src/M000078.html');return false;">
226
226
  <span class="method-name">new</span><span class="method-args">(socket)</span>
227
227
  </a>
228
228
  </div>
@@ -233,12 +233,12 @@ will write this for you based on the out length.
233
233
 
234
234
  <h3 class="section-bar">Public Instance methods</h3>
235
235
 
236
- <div id="method-M000087" class="method-detail">
237
- <a name="M000087"></a>
236
+ <div id="method-M000089" class="method-detail">
237
+ <a name="M000089"></a>
238
238
 
239
239
  <div class="method-heading">
240
- <a href="HttpResponse.src/M000087.html" target="Code" class="method-signature"
241
- onclick="popupCode('HttpResponse.src/M000087.html');return false;">
240
+ <a href="HttpResponse.src/M000089.html" target="Code" class="method-signature"
241
+ onclick="popupCode('HttpResponse.src/M000089.html');return false;">
242
242
  <span class="method-name">done</span><span class="method-args">()</span>
243
243
  </a>
244
244
  </div>
@@ -247,12 +247,12 @@ will write this for you based on the out length.
247
247
  </div>
248
248
  </div>
249
249
 
250
- <div id="method-M000086" class="method-detail">
251
- <a name="M000086"></a>
250
+ <div id="method-M000088" class="method-detail">
251
+ <a name="M000088"></a>
252
252
 
253
253
  <div class="method-heading">
254
- <a href="HttpResponse.src/M000086.html" target="Code" class="method-signature"
255
- onclick="popupCode('HttpResponse.src/M000086.html');return false;">
254
+ <a href="HttpResponse.src/M000088.html" target="Code" class="method-signature"
255
+ onclick="popupCode('HttpResponse.src/M000088.html');return false;">
256
256
  <span class="method-name">done=</span><span class="method-args">(val)</span>
257
257
  </a>
258
258
  </div>
@@ -265,12 +265,12 @@ there isn&#8217;t any more processing sent to the client.
265
265
  </div>
266
266
  </div>
267
267
 
268
- <div id="method-M000085" class="method-detail">
269
- <a name="M000085"></a>
268
+ <div id="method-M000087" class="method-detail">
269
+ <a name="M000087"></a>
270
270
 
271
271
  <div class="method-heading">
272
- <a href="HttpResponse.src/M000085.html" target="Code" class="method-signature"
273
- onclick="popupCode('HttpResponse.src/M000085.html');return false;">
272
+ <a href="HttpResponse.src/M000087.html" target="Code" class="method-signature"
273
+ onclick="popupCode('HttpResponse.src/M000087.html');return false;">
274
274
  <span class="method-name">finished</span><span class="method-args">()</span>
275
275
  </a>
276
276
  </div>
@@ -283,12 +283,12 @@ the proper format to make an HTTP/1.1 response.
283
283
  </div>
284
284
  </div>
285
285
 
286
- <div id="method-M000078" class="method-detail">
287
- <a name="M000078"></a>
286
+ <div id="method-M000080" class="method-detail">
287
+ <a name="M000080"></a>
288
288
 
289
289
  <div class="method-heading">
290
- <a href="HttpResponse.src/M000078.html" target="Code" class="method-signature"
291
- onclick="popupCode('HttpResponse.src/M000078.html');return false;">
290
+ <a href="HttpResponse.src/M000080.html" target="Code" class="method-signature"
291
+ onclick="popupCode('HttpResponse.src/M000080.html');return false;">
292
292
  <span class="method-name">reset</span><span class="method-args">()</span>
293
293
  </a>
294
294
  </div>
@@ -303,12 +303,12 @@ actually.
303
303
  </div>
304
304
  </div>
305
305
 
306
- <div id="method-M000081" class="method-detail">
307
- <a name="M000081"></a>
306
+ <div id="method-M000083" class="method-detail">
307
+ <a name="M000083"></a>
308
308
 
309
309
  <div class="method-heading">
310
- <a href="HttpResponse.src/M000081.html" target="Code" class="method-signature"
311
- onclick="popupCode('HttpResponse.src/M000081.html');return false;">
310
+ <a href="HttpResponse.src/M000083.html" target="Code" class="method-signature"
311
+ onclick="popupCode('HttpResponse.src/M000083.html');return false;">
312
312
  <span class="method-name">send_body</span><span class="method-args">()</span>
313
313
  </a>
314
314
  </div>
@@ -317,12 +317,12 @@ actually.
317
317
  </div>
318
318
  </div>
319
319
 
320
- <div id="method-M000082" class="method-detail">
321
- <a name="M000082"></a>
320
+ <div id="method-M000084" class="method-detail">
321
+ <a name="M000084"></a>
322
322
 
323
323
  <div class="method-heading">
324
- <a href="HttpResponse.src/M000082.html" target="Code" class="method-signature"
325
- onclick="popupCode('HttpResponse.src/M000082.html');return false;">
324
+ <a href="HttpResponse.src/M000084.html" target="Code" class="method-signature"
325
+ onclick="popupCode('HttpResponse.src/M000084.html');return false;">
326
326
  <span class="method-name">send_file</span><span class="method-args">(path)</span>
327
327
  </a>
328
328
  </div>
@@ -345,12 +345,12 @@ the ruby-sendfile signature.
345
345
  </div>
346
346
  </div>
347
347
 
348
- <div id="method-M000080" class="method-detail">
349
- <a name="M000080"></a>
348
+ <div id="method-M000082" class="method-detail">
349
+ <a name="M000082"></a>
350
350
 
351
351
  <div class="method-heading">
352
- <a href="HttpResponse.src/M000080.html" target="Code" class="method-signature"
353
- onclick="popupCode('HttpResponse.src/M000080.html');return false;">
352
+ <a href="HttpResponse.src/M000082.html" target="Code" class="method-signature"
353
+ onclick="popupCode('HttpResponse.src/M000082.html');return false;">
354
354
  <span class="method-name">send_header</span><span class="method-args">()</span>
355
355
  </a>
356
356
  </div>
@@ -359,12 +359,12 @@ the ruby-sendfile signature.
359
359
  </div>
360
360
  </div>
361
361
 
362
- <div id="method-M000079" class="method-detail">
363
- <a name="M000079"></a>
362
+ <div id="method-M000081" class="method-detail">
363
+ <a name="M000081"></a>
364
364
 
365
365
  <div class="method-heading">
366
- <a href="HttpResponse.src/M000079.html" target="Code" class="method-signature"
367
- onclick="popupCode('HttpResponse.src/M000079.html');return false;">
366
+ <a href="HttpResponse.src/M000081.html" target="Code" class="method-signature"
367
+ onclick="popupCode('HttpResponse.src/M000081.html');return false;">
368
368
  <span class="method-name">send_status</span><span class="method-args">(content_length=nil)</span>
369
369
  </a>
370
370
  </div>
@@ -373,12 +373,12 @@ the ruby-sendfile signature.
373
373
  </div>
374
374
  </div>
375
375
 
376
- <div id="method-M000083" class="method-detail">
377
- <a name="M000083"></a>
376
+ <div id="method-M000085" class="method-detail">
377
+ <a name="M000085"></a>
378
378
 
379
379
  <div class="method-heading">
380
- <a href="HttpResponse.src/M000083.html" target="Code" class="method-signature"
381
- onclick="popupCode('HttpResponse.src/M000083.html');return false;">
380
+ <a href="HttpResponse.src/M000085.html" target="Code" class="method-signature"
381
+ onclick="popupCode('HttpResponse.src/M000085.html');return false;">
382
382
  <span class="method-name">socket_error</span><span class="method-args">(details)</span>
383
383
  </a>
384
384
  </div>
@@ -387,12 +387,12 @@ the ruby-sendfile signature.
387
387
  </div>
388
388
  </div>
389
389
 
390
- <div id="method-M000077" class="method-detail">
391
- <a name="M000077"></a>
390
+ <div id="method-M000079" class="method-detail">
391
+ <a name="M000079"></a>
392
392
 
393
393
  <div class="method-heading">
394
- <a href="HttpResponse.src/M000077.html" target="Code" class="method-signature"
395
- onclick="popupCode('HttpResponse.src/M000077.html');return false;">
394
+ <a href="HttpResponse.src/M000079.html" target="Code" class="method-signature"
395
+ onclick="popupCode('HttpResponse.src/M000079.html');return false;">
396
396
  <span class="method-name">start</span><span class="method-args">(status=200, finalize=false) {|@header, @body| ...}</span>
397
397
  </a>
398
398
  </div>
@@ -410,12 +410,12 @@ and then mongrel finalizes the request when they&#8217;re all done.
410
410
  </div>
411
411
  </div>
412
412
 
413
- <div id="method-M000084" class="method-detail">
414
- <a name="M000084"></a>
413
+ <div id="method-M000086" class="method-detail">
414
+ <a name="M000086"></a>
415
415
 
416
416
  <div class="method-heading">
417
- <a href="HttpResponse.src/M000084.html" target="Code" class="method-signature"
418
- onclick="popupCode('HttpResponse.src/M000084.html');return false;">
417
+ <a href="HttpResponse.src/M000086.html" target="Code" class="method-signature"
418
+ onclick="popupCode('HttpResponse.src/M000086.html');return false;">
419
419
  <span class="method-name">write</span><span class="method-args">(data)</span>
420
420
  </a>
421
421
  </div>
@@ -5,21 +5,21 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>reset (Mongrel::HttpResponse)</title>
8
+ <title>new (Mongrel::HttpResponse)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 361</span>
14
- 361: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset</span>
15
- 362: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@body_sent</span>
16
- 363: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;You have already sent the request body.&quot;</span>
17
- 364: <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@header_sent</span>
18
- 365: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;You have already sent the request headers.&quot;</span>
19
- 366: <span class="ruby-keyword kw">else</span>
20
- 367: <span class="ruby-ivar">@header</span>.<span class="ruby-identifier">out</span>.<span class="ruby-identifier">rewind</span>
21
- 368: <span class="ruby-ivar">@body</span>.<span class="ruby-identifier">rewind</span>
22
- 369: <span class="ruby-keyword kw">end</span>
23
- 370: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 334</span>
14
+ 334: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">socket</span>)
15
+ 335: <span class="ruby-ivar">@socket</span> = <span class="ruby-identifier">socket</span>
16
+ 336: <span class="ruby-ivar">@body</span> = <span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>
17
+ 337: <span class="ruby-ivar">@status</span> = <span class="ruby-value">404</span>
18
+ 338: <span class="ruby-ivar">@header</span> = <span class="ruby-constant">HeaderOut</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>)
19
+ 339: <span class="ruby-ivar">@header</span>[<span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">DATE</span>] = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">httpdate</span>
20
+ 340: <span class="ruby-ivar">@body_sent</span> = <span class="ruby-keyword kw">false</span>
21
+ 341: <span class="ruby-ivar">@header_sent</span> = <span class="ruby-keyword kw">false</span>
22
+ 342: <span class="ruby-ivar">@status_sent</span> = <span class="ruby-keyword kw">false</span>
23
+ 343: <span class="ruby-keyword kw">end</span></pre>
24
24
  </body>
25
25
  </html>
@@ -5,18 +5,16 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>send_status (Mongrel::HttpResponse)</title>
8
+ <title>start (Mongrel::HttpResponse)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 372</span>
14
- 372: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_status</span>(<span class="ruby-identifier">content_length</span>=<span class="ruby-keyword kw">nil</span>)
15
- 373: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@status_sent</span>
16
- 374: <span class="ruby-identifier">content_length</span> <span class="ruby-operator">||=</span> <span class="ruby-ivar">@body</span>.<span class="ruby-identifier">length</span>
17
- 375: <span class="ruby-identifier">write</span>(<span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">STATUS_FORMAT</span> <span class="ruby-operator">%</span> [<span class="ruby-identifier">status</span>, <span class="ruby-constant">HTTP_STATUS_CODES</span>[<span class="ruby-ivar">@status</span>], <span class="ruby-identifier">content_length</span>])
18
- 376: <span class="ruby-ivar">@status_sent</span> = <span class="ruby-keyword kw">true</span>
19
- 377: <span class="ruby-keyword kw">end</span>
20
- 378: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 353</span>
14
+ 353: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start</span>(<span class="ruby-identifier">status</span>=<span class="ruby-value">200</span>, <span class="ruby-identifier">finalize</span>=<span class="ruby-keyword kw">false</span>)
15
+ 354: <span class="ruby-ivar">@status</span> = <span class="ruby-identifier">status</span>.<span class="ruby-identifier">to_i</span>
16
+ 355: <span class="ruby-keyword kw">yield</span> <span class="ruby-ivar">@header</span>, <span class="ruby-ivar">@body</span>
17
+ 356: <span class="ruby-identifier">finished</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">finalize</span>
18
+ 357: <span class="ruby-keyword kw">end</span></pre>
21
19
  </body>
22
20
  </html>
@@ -5,18 +5,21 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>send_header (Mongrel::HttpResponse)</title>
8
+ <title>reset (Mongrel::HttpResponse)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 380</span>
14
- 380: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_header</span>
15
- 381: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@header_sent</span>
16
- 382: <span class="ruby-ivar">@header</span>.<span class="ruby-identifier">out</span>.<span class="ruby-identifier">rewind</span>
17
- 383: <span class="ruby-identifier">write</span>(<span class="ruby-ivar">@header</span>.<span class="ruby-identifier">out</span>.<span class="ruby-identifier">read</span> <span class="ruby-operator">+</span> <span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">LINE_END</span>)
18
- 384: <span class="ruby-ivar">@header_sent</span> = <span class="ruby-keyword kw">true</span>
19
- 385: <span class="ruby-keyword kw">end</span>
20
- 386: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 362</span>
14
+ 362: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset</span>
15
+ 363: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@body_sent</span>
16
+ 364: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;You have already sent the request body.&quot;</span>
17
+ 365: <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@header_sent</span>
18
+ 366: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;You have already sent the request headers.&quot;</span>
19
+ 367: <span class="ruby-keyword kw">else</span>
20
+ 368: <span class="ruby-ivar">@header</span>.<span class="ruby-identifier">out</span>.<span class="ruby-identifier">rewind</span>
21
+ 369: <span class="ruby-ivar">@body</span>.<span class="ruby-identifier">rewind</span>
22
+ 370: <span class="ruby-keyword kw">end</span>
23
+ 371: <span class="ruby-keyword kw">end</span></pre>
21
24
  </body>
22
25
  </html>
@@ -5,18 +5,18 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>send_body (Mongrel::HttpResponse)</title>
8
+ <title>send_status (Mongrel::HttpResponse)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 388</span>
14
- 388: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_body</span>
15
- 389: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@body_sent</span>
16
- 390: <span class="ruby-ivar">@body</span>.<span class="ruby-identifier">rewind</span>
17
- 391: <span class="ruby-identifier">write</span>(<span class="ruby-ivar">@body</span>.<span class="ruby-identifier">read</span>)
18
- 392: <span class="ruby-ivar">@body_sent</span> = <span class="ruby-keyword kw">true</span>
19
- 393: <span class="ruby-keyword kw">end</span>
20
- 394: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 373</span>
14
+ 373: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_status</span>(<span class="ruby-identifier">content_length</span>=<span class="ruby-keyword kw">nil</span>)
15
+ 374: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@status_sent</span>
16
+ 375: <span class="ruby-identifier">content_length</span> <span class="ruby-operator">||=</span> <span class="ruby-ivar">@body</span>.<span class="ruby-identifier">length</span>
17
+ 376: <span class="ruby-identifier">write</span>(<span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">STATUS_FORMAT</span> <span class="ruby-operator">%</span> [<span class="ruby-identifier">status</span>, <span class="ruby-constant">HTTP_STATUS_CODES</span>[<span class="ruby-ivar">@status</span>], <span class="ruby-identifier">content_length</span>])
18
+ 377: <span class="ruby-ivar">@status_sent</span> = <span class="ruby-keyword kw">true</span>
19
+ 378: <span class="ruby-keyword kw">end</span>
20
+ 379: <span class="ruby-keyword kw">end</span></pre>
21
21
  </body>
22
22
  </html>
@@ -5,27 +5,18 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>send_file (Mongrel::HttpResponse)</title>
8
+ <title>send_header (Mongrel::HttpResponse)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 404</span>
14
- 404: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_file</span>(<span class="ruby-identifier">path</span>)
15
- 405: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">path</span>, <span class="ruby-value str">&quot;rb&quot;</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
16
- 406: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@socket</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:sendfile</span>
17
- 407: <span class="ruby-keyword kw">begin</span>
18
- 408: <span class="ruby-ivar">@socket</span>.<span class="ruby-identifier">sendfile</span>(<span class="ruby-identifier">f</span>)
19
- 409: <span class="ruby-keyword kw">rescue</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">details</span>
20
- 410: <span class="ruby-identifier">socket_error</span>(<span class="ruby-identifier">details</span>)
21
- 411: <span class="ruby-keyword kw">end</span>
22
- 412: <span class="ruby-keyword kw">else</span>
23
- 413: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">chunk</span> = <span class="ruby-identifier">f</span>.<span class="ruby-identifier">read</span>(<span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">CHUNK_SIZE</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">chunk</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
24
- 414: <span class="ruby-identifier">write</span>(<span class="ruby-identifier">chunk</span>)
25
- 415: <span class="ruby-keyword kw">end</span>
26
- 416: <span class="ruby-keyword kw">end</span>
27
- 417: <span class="ruby-ivar">@body_send</span> = <span class="ruby-keyword kw">true</span>
28
- 418: <span class="ruby-keyword kw">end</span>
29
- 419: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 381</span>
14
+ 381: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_header</span>
15
+ 382: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@header_sent</span>
16
+ 383: <span class="ruby-ivar">@header</span>.<span class="ruby-identifier">out</span>.<span class="ruby-identifier">rewind</span>
17
+ 384: <span class="ruby-identifier">write</span>(<span class="ruby-ivar">@header</span>.<span class="ruby-identifier">out</span>.<span class="ruby-identifier">read</span> <span class="ruby-operator">+</span> <span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">LINE_END</span>)
18
+ 385: <span class="ruby-ivar">@header_sent</span> = <span class="ruby-keyword kw">true</span>
19
+ 386: <span class="ruby-keyword kw">end</span>
20
+ 387: <span class="ruby-keyword kw">end</span></pre>
30
21
  </body>
31
22
  </html>
@@ -5,17 +5,18 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>socket_error (Mongrel::HttpResponse)</title>
8
+ <title>send_body (Mongrel::HttpResponse)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 421</span>
14
- 421: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">socket_error</span>(<span class="ruby-identifier">details</span>)
15
- 422: <span class="ruby-comment cmt"># ignore these since it means the client closed off early</span>
16
- 423: <span class="ruby-ivar">@socket</span>.<span class="ruby-identifier">close</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@socket</span>.<span class="ruby-identifier">closed?</span>
17
- 424: <span class="ruby-identifier">done</span> = <span class="ruby-keyword kw">true</span>
18
- 425: <span class="ruby-identifier">raise</span> <span class="ruby-identifier">details</span>
19
- 426: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 389</span>
14
+ 389: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_body</span>
15
+ 390: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@body_sent</span>
16
+ 391: <span class="ruby-ivar">@body</span>.<span class="ruby-identifier">rewind</span>
17
+ 392: <span class="ruby-identifier">write</span>(<span class="ruby-ivar">@body</span>.<span class="ruby-identifier">read</span>)
18
+ 393: <span class="ruby-ivar">@body_sent</span> = <span class="ruby-keyword kw">true</span>
19
+ 394: <span class="ruby-keyword kw">end</span>
20
+ 395: <span class="ruby-keyword kw">end</span></pre>
20
21
  </body>
21
22
  </html>
@@ -5,16 +5,27 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>write (Mongrel::HttpResponse)</title>
8
+ <title>send_file (Mongrel::HttpResponse)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 428</span>
14
- 428: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write</span>(<span class="ruby-identifier">data</span>)
15
- 429: <span class="ruby-ivar">@socket</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">data</span>)
16
- 430: <span class="ruby-keyword kw">rescue</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">details</span>
17
- 431: <span class="ruby-identifier">socket_error</span>(<span class="ruby-identifier">details</span>)
18
- 432: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 405</span>
14
+ 405: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_file</span>(<span class="ruby-identifier">path</span>)
15
+ 406: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">path</span>, <span class="ruby-value str">&quot;rb&quot;</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
16
+ 407: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@socket</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:sendfile</span>
17
+ 408: <span class="ruby-keyword kw">begin</span>
18
+ 409: <span class="ruby-ivar">@socket</span>.<span class="ruby-identifier">sendfile</span>(<span class="ruby-identifier">f</span>)
19
+ 410: <span class="ruby-keyword kw">rescue</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">details</span>
20
+ 411: <span class="ruby-identifier">socket_error</span>(<span class="ruby-identifier">details</span>)
21
+ 412: <span class="ruby-keyword kw">end</span>
22
+ 413: <span class="ruby-keyword kw">else</span>
23
+ 414: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">chunk</span> = <span class="ruby-identifier">f</span>.<span class="ruby-identifier">read</span>(<span class="ruby-constant">Const</span><span class="ruby-operator">::</span><span class="ruby-constant">CHUNK_SIZE</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">chunk</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
24
+ 415: <span class="ruby-identifier">write</span>(<span class="ruby-identifier">chunk</span>)
25
+ 416: <span class="ruby-keyword kw">end</span>
26
+ 417: <span class="ruby-keyword kw">end</span>
27
+ 418: <span class="ruby-ivar">@body_send</span> = <span class="ruby-keyword kw">true</span>
28
+ 419: <span class="ruby-keyword kw">end</span>
29
+ 420: <span class="ruby-keyword kw">end</span></pre>
19
30
  </body>
20
31
  </html>