mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-06-05 13:43:27 +03:00
minor fix
This commit is contained in:
parent
775134639d
commit
21c6b52198
|
@ -1097,11 +1097,14 @@ def __setHTTPExtraHeaders():
|
||||||
conf.headers = conf.headers.split("\n") if "\n" in conf.headers else conf.headers.split("\\n")
|
conf.headers = conf.headers.split("\n") if "\n" in conf.headers else conf.headers.split("\\n")
|
||||||
|
|
||||||
for headerValue in conf.headers:
|
for headerValue in conf.headers:
|
||||||
if ":" in headerValue:
|
if headerValue.count(':') == 1:
|
||||||
header, value = (_.lstrip() for _ in headerValue.split(":"))
|
header, value = (_.lstrip() for _ in headerValue.split(":"))
|
||||||
|
|
||||||
if header and value:
|
if header and value:
|
||||||
conf.httpHeaders.append((header, value))
|
conf.httpHeaders.append((header, value))
|
||||||
|
else:
|
||||||
|
errMsg = "Invalid header value: %s" % repr(headerValue).lstrip('u')
|
||||||
|
raise sqlmapSyntaxException, errMsg
|
||||||
|
|
||||||
elif not conf.httpHeaders or len(conf.httpHeaders) == 1:
|
elif not conf.httpHeaders or len(conf.httpHeaders) == 1:
|
||||||
conf.httpHeaders.append((HTTPHEADER.ACCEPT_LANGUAGE, "en-us,en;q=0.5"))
|
conf.httpHeaders.append((HTTPHEADER.ACCEPT_LANGUAGE, "en-us,en;q=0.5"))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user