mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 06:50:14 +00:00
Couple of trivialities
This commit is contained in:
parent
9077734ec5
commit
a851dc486a
4 changed files with 9 additions and 7 deletions
|
|
@ -154,6 +154,7 @@ class SmartRedirectHandler(_urllib.request.HTTPRedirectHandler):
|
|||
except AttributeError:
|
||||
def _(self):
|
||||
return getattr(self, "hdrs") or {}
|
||||
|
||||
result.info = types.MethodType(_, result)
|
||||
|
||||
if not hasattr(result, "read"):
|
||||
|
|
@ -164,6 +165,7 @@ class SmartRedirectHandler(_urllib.request.HTTPRedirectHandler):
|
|||
retVal = ""
|
||||
finally:
|
||||
return retVal
|
||||
|
||||
result.read = types.MethodType(_, result)
|
||||
|
||||
if not getattr(result, "url", None):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue