diff --git a/mitmproxy/addons/savehar.py b/mitmproxy/addons/savehar.py index dcc380c9d..59977e08e 100644 --- a/mitmproxy/addons/savehar.py +++ b/mitmproxy/addons/savehar.py @@ -281,7 +281,7 @@ class SaveHar: cookie = { "name": name, "value": value, - "path": attrs["path"], + "path": attrs.get("path", "/"), "domain": attrs.get("domain", ""), "httpOnly": "httpOnly" in attrs, "secure": "secure" in attrs,