From f15d6e88a9ad5c5c3f7eb0c77de05b1609549680 Mon Sep 17 00:00:00 2001 From: Jimmy Date: Mon, 4 Apr 2022 11:59:20 +1200 Subject: Add back empty header indexerror workaround The test case on the bug works for me on py37 but CI is failing on 3.10, maybe this isn't quite the same issue. Anyway, we are getting rid of webkit soon. --- qutebrowser/browser/webkit/http.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qutebrowser/browser/webkit/http.py b/qutebrowser/browser/webkit/http.py index 08a4509eb..5a7cd8b34 100644 --- a/qutebrowser/browser/webkit/http.py +++ b/qutebrowser/browser/webkit/http.py @@ -88,6 +88,11 @@ class ContentDisposition: reg = email.headerregistry.HeaderRegistry() try: parsed = reg('Content-Disposition', decoded) + except IndexError: # pragma: no cover + # WORKAROUND for https://bugs.python.org/issue37491 + # Fixed in Python 3.7.5 and 3.8.0. + # Still getting failures on 3.10 on CI though + raise ContentDispositionError("Missing closing quote character") except ValueError: # pragma: no cover # WORKAROUND for https://bugs.python.org/issue42946 raise ContentDispositionError("Non-ASCII digit") -- cgit v1.2.3-54-g00ecf