mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-06 00:09:37 +08:00
change: har2case do not ignore request headers
This commit is contained in:
@@ -14,24 +14,6 @@ except ImportError:
|
|||||||
JSONDecodeError = ValueError
|
JSONDecodeError = ValueError
|
||||||
|
|
||||||
|
|
||||||
IGNORE_REQUEST_HEADERS = [
|
|
||||||
"host",
|
|
||||||
"accept",
|
|
||||||
"content-length",
|
|
||||||
"connection",
|
|
||||||
"accept-encoding",
|
|
||||||
"accept-language",
|
|
||||||
"origin",
|
|
||||||
"cache-control",
|
|
||||||
"pragma",
|
|
||||||
"upgrade-insecure-requests",
|
|
||||||
":authority",
|
|
||||||
":method",
|
|
||||||
":scheme",
|
|
||||||
":path",
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
class HarParser(object):
|
class HarParser(object):
|
||||||
def __init__(self, har_file_path, filter_str=None, exclude_str=None):
|
def __init__(self, har_file_path, filter_str=None, exclude_str=None):
|
||||||
self.har_file_path = har_file_path
|
self.har_file_path = har_file_path
|
||||||
@@ -127,9 +109,6 @@ class HarParser(object):
|
|||||||
"""
|
"""
|
||||||
teststep_headers = {}
|
teststep_headers = {}
|
||||||
for header in entry_json["request"].get("headers", []):
|
for header in entry_json["request"].get("headers", []):
|
||||||
if header["name"].lower() in IGNORE_REQUEST_HEADERS:
|
|
||||||
continue
|
|
||||||
|
|
||||||
teststep_headers[header["name"]] = header["value"]
|
teststep_headers[header["name"]] = header["value"]
|
||||||
|
|
||||||
if teststep_headers:
|
if teststep_headers:
|
||||||
|
|||||||
Reference in New Issue
Block a user