fix: remove request header startswith : e.g. :method, :scheme

This commit is contained in:
debugtalk
2020-05-19 13:00:14 +08:00
parent f0b03d09ab
commit 8b0f31bd24
2 changed files with 5 additions and 1 deletions

View File

@@ -13,6 +13,10 @@
- fix: extract response cookies
- fix: handle errors when no valid testcases generated
**Changed**
- change: har2case do not ignore request headers, except for header startswith :
## 3.0.3 (2020-05-17)
**Fixed**

View File

@@ -109,7 +109,7 @@ class HarParser(object):
"""
teststep_headers = {}
for header in entry_json["request"].get("headers", []):
if header["name"] == "cookie":
if header["name"] == "cookie" or header["name"].startswith(":"):
continue
teststep_headers[header["name"]] = header["value"]