Merge pull request #6458 from pogzyb/main

Handle "path" KeyError in the savehar addon
This commit is contained in:
Stanley Good 2023-11-05 09:52:53 -08:00 committed by GitHub
commit a43847de18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -2,7 +2,9 @@
## Unreleased: mitmproxy next
* Update savehar addon to handle scenarios where "path" key in cookie
attrs dict is missing.
([#6458](https://github.com/mitmproxy/mitmproxy/pull/6458), @pogzyb)
## 04 November 2023: mitmproxy 10.1.3

View File

@ -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,