On 10/17/06, <b class="gmail_sendername">Rust, Jon</b> &lt;<a href="mailto:jrust@lexus.elabor.com">jrust@lexus.elabor.com</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Aaron Patterson wrote:<br>&gt; If you set mechanize to log, it should log your request headers.&nbsp;&nbsp;So<br>&gt; just do this:<br>&gt;&nbsp;&nbsp; require 'logger'<br>&gt;&nbsp;&nbsp; agent = WWW::Mechanize.new { |a| a.log = Logger.new('mech.log') }
<br>&gt;<br>&gt; You can also change the action on the form.&nbsp;&nbsp;There is an action= method<br>&gt; on the form, so you could just do this:<br>&gt;&nbsp;&nbsp; form.action = '/some_location'<br>&gt;<br><br>Awesome! Thanks Aaron. Great s/w BTW.
</blockquote><div><br>Thanks!&nbsp; I'm glad you like it!<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">OK, I've grabbed a couple of sessions via logging, and also via
<br>sniffing. The only difference I've been able to find so far between<br>Firefox, Perl Mech and Ruby Mech is that the POST URL is encoded when<br>using Ruby Mech. Specifically, the '&amp;' is represented as '&amp;amp;':
<br><br>POST /page.aspx?cID=1234&amp;amp;ssID=ksdb...<br><br>vs<br><br>POST /page.aspx?cID=1234&amp;ssID=lpwioe...<br><br>Expected? If it matters, the content of the POST does not have '&amp;'<br>encoded like this, just the URL provided in the initial POST.
</blockquote><div><br>Interesting!&nbsp; This is not expected, and looks like a bug.&nbsp; Can you view the source of the page and send me the action of the form?&nbsp; I think I know what is wrong, and I'll try to reproduce it.<br></div>
<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Thanks again!<br>Jon<br>_______________________________________________<br>Mechanize-users mailing list
<br><a href="mailto:Mechanize-users@rubyforge.org">Mechanize-users@rubyforge.org</a><br><a href="http://rubyforge.org/mailman/listinfo/mechanize-users">http://rubyforge.org/mailman/listinfo/mechanize-users</a><br></blockquote>
</div><br><br clear="all"><br>-- <br>Aaron Patterson<br><a href="http://tenderlovemaking.com/">http://tenderlovemaking.com/</a>