doc/rdoc/classes/RFuzz/HttpClient.src/M000029.html in rfuzz-0.8 vs doc/rdoc/classes/RFuzz/HttpClient.src/M000029.html in rfuzz-0.9
- old
+ new
@@ -3,16 +3,32 @@
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
- <title>reset (RFuzz::HttpClient)</title>
+ <title>redirect (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 440</span>
-440: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset</span>
-441: <span class="ruby-ivar">@cookies</span>.<span class="ruby-identifier">clear</span>
-442: <span class="ruby-keyword kw">end</span></pre>
+ <pre> <span class="ruby-comment cmt"># File lib/rfuzz/client.rb, line 418</span>
+418: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">redirect</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">resp</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
+419: <span class="ruby-ivar">@redirect</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span>
+420: <span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">http_status</span>.<span class="ruby-identifier">index</span>(<span class="ruby-value str">"3"</span>) <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
+421:
+422: <span class="ruby-identifier">host</span> = <span class="ruby-identifier">encode_host</span>(<span class="ruby-ivar">@host</span>,<span class="ruby-ivar">@port</span>)
+423: <span class="ruby-identifier">location</span> = <span class="ruby-identifier">resp</span>[<span class="ruby-constant">LOCATION</span>]
+424:
+425: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">location</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">host</span>) <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
+426: <span class="ruby-comment cmt"># begins with the host so strip that off</span>
+427: <span class="ruby-identifier">location</span> = <span class="ruby-identifier">location</span>[<span class="ruby-identifier">host</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">..</span> <span class="ruby-value">-1</span>]
+428: <span class="ruby-keyword kw">end</span>
+429:
+430: <span class="ruby-ivar">@notifier</span>.<span class="ruby-identifier">redirect</span>(<span class="ruby-identifier">:begins</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@notifier</span>
+431: <span class="ruby-identifier">resp</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">location</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
+432: <span class="ruby-ivar">@notifier</span>.<span class="ruby-identifier">redirect</span>(<span class="ruby-identifier">:ends</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@notifier</span>
+433: <span class="ruby-keyword kw">end</span>
+434:
+435: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
+436: <span class="ruby-keyword kw">end</span></pre>
</body>
</html>
\ No newline at end of file