mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +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")
|
||||
|
||||
for headerValue in conf.headers:
|
||||
if ":" in headerValue:
|
||||
if headerValue.count(':') == 1:
|
||||
header, value = (_.lstrip() for _ in headerValue.split(":"))
|
||||
|
||||
if header and 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:
|
||||
conf.httpHeaders.append((HTTPHEADER.ACCEPT_LANGUAGE, "en-us,en;q=0.5"))
|
||||
|
|
Loading…
Reference in New Issue
Block a user