On 10/17/06, <b class="gmail_sendername">Rust, Jon</b> <<a href="mailto:jrust@lexus.elabor.com">jrust@lexus.elabor.com</a>> 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>> If you set mechanize to log, it should log your request headers. So<br>> just do this:<br>> require 'logger'<br>> agent = WWW::Mechanize.new { |a| a.log = Logger.new('mech.log') }
<br>><br>> You can also change the action on the form. There is an action= method<br>> on the form, so you could just do this:<br>> form.action = '/some_location'<br>><br><br>Awesome! Thanks Aaron. Great s/w BTW.
</blockquote><div><br>Thanks! 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 '&' is represented as '&amp;':
<br><br>POST /page.aspx?cID=1234&amp;ssID=ksdb...<br><br>vs<br><br>POST /page.aspx?cID=1234&ssID=lpwioe...<br><br>Expected? If it matters, the content of the POST does not have '&'<br>encoded like this, just the URL provided in the initial POST.
</blockquote><div><br>Interesting! This is not expected, and looks like a bug. Can you view the source of the page and send me the action of the form? 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>