Added some functionality for cases where request follows redirects