diff options
author | Jimmy <jimmy@spalge.com> | 2022-04-04 11:59:20 +1200 |
---|---|---|
committer | Jimmy <jimmy@spalge.com> | 2022-04-04 12:08:19 +1200 |
commit | f15d6e88a9ad5c5c3f7eb0c77de05b1609549680 (patch) | |
tree | a3ed239bc81d8bc259ad66ca10775977bcf55aa0 | |
parent | cd4429db25746acbec3ef434935959d0f5f66224 (diff) | |
download | qutebrowser-feat/remove_py36_support.tar.gz qutebrowser-feat/remove_py36_support.zip |
Add back empty header indexerror workaroundfeat/remove_py36_support
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.
-rw-r--r-- | qutebrowser/browser/webkit/http.py | 5 |
1 files changed, 5 insertions, 0 deletions
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") |