doc/rdoc/classes/RFuzz/HttpClient.src/M000024.html in rfuzz-0.8 vs doc/rdoc/classes/RFuzz/HttpClient.src/M000024.html in rfuzz-0.9

- old
+ new

@@ -3,20 +3,33 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> - <title>store_cookies (RFuzz::HttpClient)</title> + <title>read_chunked_body (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 329</span> -329: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_cookies</span>(<span class="ruby-identifier">resp</span>) -330: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resp</span>[<span class="ruby-constant">SET_COOKIE</span>] -331: <span class="ruby-identifier">cookies</span> = <span class="ruby-identifier">query_parse</span>(<span class="ruby-identifier">resp</span>[<span class="ruby-constant">SET_COOKIE</span>], <span class="ruby-value str">';'</span>) -332: <span class="ruby-ivar">@cookies</span>.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">cookies</span> -333: <span class="ruby-ivar">@cookies</span>.<span class="ruby-identifier">delete</span> <span class="ruby-value str">&quot;path&quot;</span> -334: <span class="ruby-keyword kw">end</span> -335: <span class="ruby-keyword kw">end</span></pre> + <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 306</span> +306: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_chunked_body</span>(<span class="ruby-identifier">header</span>) +307: <span class="ruby-ivar">@sock</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">header</span>.<span class="ruby-identifier">http_body</span>) +308: <span class="ruby-identifier">header</span>.<span class="ruby-identifier">http_body</span> = <span class="ruby-value str">&quot;&quot;</span> +309: <span class="ruby-identifier">header</span>.<span class="ruby-identifier">raw_chunks</span> = [] +310: +311: <span class="ruby-keyword kw">while</span> <span class="ruby-keyword kw">true</span> +312: <span class="ruby-ivar">@notifier</span>.<span class="ruby-identifier">read_chunk</span>(<span class="ruby-identifier">:begins</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@notifier</span> +313: <span class="ruby-identifier">chunk</span> = <span class="ruby-identifier">read_chunked_header</span> +314: <span class="ruby-identifier">header</span>.<span class="ruby-identifier">raw_chunks</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">chunk</span> +315: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">chunk</span>.<span class="ruby-identifier">last_chunk?</span> +316: <span class="ruby-identifier">header</span>.<span class="ruby-identifier">http_body</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">chunk</span>.<span class="ruby-identifier">http_body</span> +317: <span class="ruby-ivar">@notifier</span>.<span class="ruby-identifier">read_chunk</span>(<span class="ruby-identifier">:end</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@notifier</span> +318: <span class="ruby-keyword kw">else</span> +319: <span class="ruby-ivar">@notifier</span>.<span class="ruby-identifier">read_chunk</span>(<span class="ruby-identifier">:end</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@notifier</span> +320: <span class="ruby-keyword kw">break</span> <span class="ruby-comment cmt"># last chunk, done</span> +321: <span class="ruby-keyword kw">end</span> +322: <span class="ruby-keyword kw">end</span> +323: +324: <span class="ruby-identifier">header</span> +325: <span class="ruby-keyword kw">end</span></pre> </body> </html> \ No newline at end of file