jjlee / mechanize

Stateful programmatic web browsing in Python, after Andy Lester's Perl module WWW::Mechanize .
http://wwwsearch.sourceforge.net/mechanize/
618 stars 123 forks source link

Redirect request must visit if original request does #23

Open KangOl opened 14 years ago

KangOl commented 14 years ago

If you navigate to a page A that redirect to page B, the page you visit is the page B. This is the page that must be added to the history. When reload()ing the browser, that the page B that must be requested, not page A

This is really problematic if the page A is a submitted form.

The fix is easy, however it break a doctest but, as explain above, this test seems based on a false assumption.

Patch: http://paste.pocoo.org/show/229138/

For testing purpose, here is a simple server and a test script http://paste.pocoo.org/show/229139/ http://paste.pocoo.org/show/229140/