doc/rdoc/classes/RFuzz/HttpClient.src/M000022.html in rfuzz-0.8 vs doc/rdoc/classes/RFuzz/HttpClient.src/M000022.html in rfuzz-0.9
- old
+ new
@@ -3,28 +3,26 @@
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
- <title>read_chunked_header (RFuzz::HttpClient)</title>
+ <title>read_parsed_header (RFuzz::HttpClient)</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/rfuzz/client.rb, line 286</span>
-286: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_chunked_header</span>
-287: <span class="ruby-identifier">resp</span> = <span class="ruby-identifier">read_parsed_header</span>
-288: <span class="ruby-ivar">@sock</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">resp</span>.<span class="ruby-identifier">http_body</span>)
-289:
-290: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">resp</span>.<span class="ruby-identifier">last_chunk?</span>
-291: <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">http_body</span> = <span class="ruby-ivar">@sock</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">resp</span>.<span class="ruby-identifier">chunk_size</span>)
-292:
-293: <span class="ruby-identifier">trail</span> = <span class="ruby-ivar">@sock</span>.<span class="ruby-identifier">read</span>(<span class="ruby-value">2</span>)
-294: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">trail</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">CRLF</span>
-295: <span class="ruby-identifier">raise</span> <span class="ruby-constant">HttpClientParserError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"Chunk ended in #{trail.inspect} not #{CRLF.inspect}"</span>)
-296: <span class="ruby-keyword kw">end</span>
-297: <span class="ruby-keyword kw">end</span>
-298:
-299: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
-300: <span class="ruby-keyword kw">end</span></pre>
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 270</span>
+270: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_parsed_header</span>
+271: <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">reset</span>
+272: <span class="ruby-identifier">resp</span> = <span class="ruby-constant">HttpResponse</span>.<span class="ruby-identifier">new</span>
+273: <span class="ruby-identifier">data</span> = <span class="ruby-ivar">@sock</span>.<span class="ruby-identifier">read</span>(<span class="ruby-constant">CHUNK_SIZE</span>, <span class="ruby-identifier">partial</span>=<span class="ruby-keyword kw">true</span>)
+274: <span class="ruby-identifier">nread</span> = <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">execute</span>(<span class="ruby-identifier">resp</span>, <span class="ruby-identifier">data</span>, <span class="ruby-value">0</span>)
+275:
+276: <span class="ruby-keyword kw">while</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">finished?</span>
+277: <span class="ruby-identifier">data</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@sock</span>.<span class="ruby-identifier">read</span>(<span class="ruby-constant">CHUNK_SIZE</span>, <span class="ruby-identifier">partial</span>=<span class="ruby-keyword kw">true</span>)
+278: <span class="ruby-identifier">nread</span> = <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">execute</span>(<span class="ruby-identifier">resp</span>, <span class="ruby-identifier">data</span>, <span class="ruby-identifier">nread</span>)
+279: <span class="ruby-keyword kw">end</span>
+280:
+281: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
+282: <span class="ruby-keyword kw">end</span></pre>
</body>
</html>
\ No newline at end of file