sparklemotion/mechanize — pull request #294 by tombenner (2013-02-19 23:52:17+00:00)
Title: Follow meta refreshes for responses that only contain a refresh meta tag (e.g. t.co responses)

Mechanize currently doesn't follow t.co meta refreshes because they have a response without a `

`. For example, the response for [http://t.co/Lizw8srs](http://t.co/Lizw8srs) is simply:

The ['head > meta' selector](https://github.com/sparklemotion/mechanize/blob/master/lib/mechanize/page.rb#L374) doesn't match this, so Mechanize doesn't follow this redirect.

It looks like the original intent of `agent.follow_meta_refresh = :anywhere` was to avoid following meta refreshes outside of `

` (see #13 & #99), but this seems to be an entirely different case.

These ``-only responses are explicit in intent, and fetching t.co URLs is likely a very common need.