From 695e313aba0da2edb888b70b8f73a9b7703138b1 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Tue, 19 May 2020 11:59:25 +0800 Subject: [PATCH] change: har2case do not ignore request headers --- httprunner/ext/har2case/core.py | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/httprunner/ext/har2case/core.py b/httprunner/ext/har2case/core.py index a65b2bfd..e460169f 100644 --- a/httprunner/ext/har2case/core.py +++ b/httprunner/ext/har2case/core.py @@ -14,24 +14,6 @@ except ImportError: 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): def __init__(self, har_file_path, filter_str=None, exclude_str=None): self.har_file_path = har_file_path @@ -127,9 +109,6 @@ class HarParser(object): """ teststep_headers = {} for header in entry_json["request"].get("headers", []): - if header["name"].lower() in IGNORE_REQUEST_HEADERS: - continue - teststep_headers[header["name"]] = header["value"] if teststep_headers: