Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 36bc410

Browse files
committed
Minor bug fix
1 parent 6b70dad commit 36bc410

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lib/request/connect.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,11 @@ def getPage(**kwargs):
169169

170170
conn = urllib2.urlopen(req)
171171

172-
if req.has_header("Authorization"):
173-
kb.authHeader = req.headers["Authorization"]
172+
if not kb.authHeader and req.has_header("Authorization"):
173+
kb.authHeader = req.get_header("Authorization")
174174

175-
if req.has_header("Proxy-authorization"):
176-
kb.proxyAuthHeader = req.headers["Proxy-authorization"]
175+
if not kb.proxyAuthHeader and req.has_header("Proxy-authorization"):
176+
kb.proxyAuthHeader = req.get_header("Proxy-authorization")
177177

178178
if hasattr(conn, "redurl") and hasattr(conn, "redcode") and not conf.redirectHandled:
179179
msg = "sqlmap got a %d redirect to " % conn.redcode

0 commit comments

Comments
 (0)