Adding switch --ignore-redirects (Issue #2286)

This commit is contained in:
Miroslav Stampar
2016-11-25 13:32:28 +01:00
parent 4e1bdb0c70
commit 2a754eef1c
6 changed files with 14 additions and 6 deletions

View File

@@ -71,7 +71,7 @@ class SmartRedirectHandler(urllib2.HTTPRedirectHandler):
def http_error_302(self, req, fp, code, msg, headers):
content = None
redurl = self._get_header_redirect(headers)
redurl = self._get_header_redirect(headers) if not conf.ignoreRedirects else None
try:
content = fp.read(MAX_CONNECTION_TOTAL_SIZE)