Hello,<br>I have a login form on /login.php which POSTs to /dorf1.php when access is granted and to /login.php when it is denied.<br><br>require &#39;rubygems&#39;<br>require &#39;mechanize&#39;<br>agent = WWW:Mechanize.new
()<br>login = agent.get(&quot;<a href="http://server/login.php">http://server/login.php</a>&quot;)<br>form = login.forms.action(&quot;dorf1.php&quot;)<br>form.fields[2].value = &quot;wronguser&quot;&nbsp; # login<br>form.fields
[3].value = &quot;wrongpass&quot;&nbsp; # password<br>dorf1 = form.submit()<br>dorf1.uri<br>&nbsp;&nbsp;&nbsp; # =&gt; #&lt;URI::HTTP:0x15af2e04dc7c URL:<a href="http://server/dorf1.php">http://server/dorf1.php</a>&gt;<br><br>But the page we got was &quot;
login.php&quot; (a bit altered: &quot;access denied&quot;, etc.)<br>So the URI of the page returned by form.submit() isn&#39;t updated if there is a redirect, please fix :)<br>Best regards.<br>