I guess something like that should work:

* On ```Exploit::Remote::HttpClient``` add:

```ruby
  def send_request_cgi(opts={}, timeout = 20)
    t = opts[:timeout] ? opts[:timeout] : timeout
    begin
      c = connect(opts)
      r = c.request_cgi(opts)
      res = c.send_recv(r, t)

      if res.redirect? && follow_redirect?(opts)
        update_redirect_opts(opts, res)
        response = send_request_cgi(opts, t)
      end

      response
    rescue ::Errno::EPIPE, ::Timeout::Error
      nil
    end
  end

  def follow_redirect?(opts)
    opts['redirect_depth'] ||= 1
    opts['follow_redirect'] && opts['redirect_depth'] > 0
  end

  def update_redirect_opts(opts, res)
    opts['redirect_depth'] -= 1
    location = URI(res.headers['Location'])
    opts['redirect_uri'] = location
    opts['uri']   = location.path
    opts['rhost'] = location.host
    opts['vhost'] = location.host
    opts['rport'] = location.port
    opts['ssl'] = true if location.scheme == 'https'
  end
```

* on ```Rex::Proto::Http::Rexponse``` add:

```
  def redirect?
    code == 301 || code == 302 || code == 303 || code == 307 || code == 308
  end
```

On the other hand, maybe want to ask / wait in case there is more feedback from other (more experienced) core developers :) A code like the above would mostly look good to me (should check redirections mostly work with this code), and add yard documentation of course!