Swap double string comparison for regex match
Slim down proxy_uri method
Refactor setup_http
Move http_class selection out of the setup_http method
Move Location header parsing logic into its own method
Replace recursion with iteration
Only raise ImageFetchFailure inside the method responsible for fetching