Simplify download and support 302 redirect