doc/rdoc/classes/Mongrel/HttpResponse.src/M000082.html in mongrel-0.3.13 vs doc/rdoc/classes/Mongrel/HttpResponse.src/M000082.html in mongrel-0.3.13.1
- old
+ new
@@ -3,29 +3,20 @@
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
- <title>send_file (Mongrel::HttpResponse)</title>
+ <title>send_header (Mongrel::HttpResponse)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
- <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 404</span>
-404: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_file</span>(<span class="ruby-identifier">path</span>)
-405: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">path</span>, <span class="ruby-value str">"rb"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
-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>
-407: <span class="ruby-keyword kw">begin</span>
-408: <span class="ruby-ivar">@socket</span>.<span class="ruby-identifier">sendfile</span>(<span class="ruby-identifier">f</span>)
-409: <span class="ruby-keyword kw">rescue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">details</span>
-410: <span class="ruby-identifier">socket_error</span>(<span class="ruby-identifier">details</span>)
-411: <span class="ruby-keyword kw">end</span>
-412: <span class="ruby-keyword kw">else</span>
-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">></span> <span class="ruby-value">0</span>
-414: <span class="ruby-identifier">write</span>(<span class="ruby-identifier">chunk</span>)
-415: <span class="ruby-keyword kw">end</span>
-416: <span class="ruby-keyword kw">end</span>
-417: <span class="ruby-ivar">@body_send</span> = <span class="ruby-keyword kw">true</span>
-418: <span class="ruby-keyword kw">end</span>
-419: <span class="ruby-keyword kw">end</span></pre>
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 381</span>
+381: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_header</span>
+382: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@header_sent</span>
+383: <span class="ruby-ivar">@header</span>.<span class="ruby-identifier">out</span>.<span class="ruby-identifier">rewind</span>
+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>)
+385: <span class="ruby-ivar">@header_sent</span> = <span class="ruby-keyword kw">true</span>
+386: <span class="ruby-keyword kw">end</span>
+387: <span class="ruby-keyword kw">end</span></pre>
</body>
</html>
\ No newline at end of file