mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-31 11:59:04 +00:00
revert of some HTTP headers handling
This commit is contained in:
@@ -21,7 +21,6 @@ from lib.core.common import posixToNtSlashes
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
from lib.core.enums import PLACE
|
||||
from lib.parse.headers import headersParser
|
||||
from lib.parse.html import htmlParser
|
||||
|
||||
@@ -34,9 +33,9 @@ def forgeHeaders(cookie, ua):
|
||||
headers = {}
|
||||
|
||||
for header, value in conf.httpHeaders:
|
||||
if cookie and header == PLACE.COOKIE:
|
||||
if cookie and header == "Cookie":
|
||||
headers[header] = cookie
|
||||
elif ua and header == PLACE.UA:
|
||||
elif ua and header == "User-Agent":
|
||||
headers[header] = ua
|
||||
else:
|
||||
headers[header] = value
|
||||
|
||||
@@ -166,7 +166,7 @@ class Connect:
|
||||
|
||||
requestHeaders += "\n".join(["%s: %s" % (header, value) for header, value in req.header_items()])
|
||||
|
||||
if not req.has_header(PLACE.COOKIE) and cookieStr:
|
||||
if not req.has_header("Cookie") and cookieStr:
|
||||
requestHeaders += "\n%s" % cookieStr[:-2]
|
||||
|
||||
if not req.has_header("Connection"):
|
||||
@@ -370,7 +370,7 @@ class Connect:
|
||||
if not auxHeaders:
|
||||
auxHeaders = {}
|
||||
|
||||
auxHeaders[NULLCONNECTION.RANGE] = "bytes=-1"
|
||||
auxHeaders["Range"] = "bytes=-1"
|
||||
|
||||
_, headers = Connect.getPage(url=uri, get=get, post=post, cookie=cookie, ua=ua, silent=silent, method=method, auxHeaders=auxHeaders, raise404=raise404)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user