mirror of
https://github.com/adulau/HHHash.git
synced 2024-12-22 00:36:01 +00:00
fix: [hhhash] we don't want to follow HTTP redirects for HHHash
This commit is contained in:
parent
b6eec03adc
commit
5c4f820449
1 changed files with 2 additions and 2 deletions
|
@ -16,9 +16,9 @@ def buildhash(url=None, debug=False, method='GET', timeout=5):
|
||||||
if url is None:
|
if url is None:
|
||||||
return False
|
return False
|
||||||
if method == 'GET':
|
if method == 'GET':
|
||||||
r = requests.get(url, timeout=timeout)
|
r = requests.get(url, timeout=timeout, allow_redirects=False)
|
||||||
elif method == 'HEAD':
|
elif method == 'HEAD':
|
||||||
r = requests.head(url, timeout=timeout)
|
r = requests.head(url, timeout=timeout, allow_redirects=False)
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
hhhash = ""
|
hhhash = ""
|
||||||
|
|
Loading…
Reference in a new issue