Merge branch 'qutebrowser:master' into master

This commit is contained in:
mkonig 2022-01-25 21:42:05 +01:00 committed by GitHub
commit aec86e3366
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View File

@ -45,6 +45,8 @@ Changed
- The `qute-bitwarden` userscript understands a new
`--password-prompt-invocation`, which can be used to specify a tool other
than `rofi` to ask for a password.
- The `content.headers.custom` setting now accepts empty strings as values,
resulting in an empty header being sent.
Added
~~~~~

View File

@ -51,7 +51,9 @@ def custom_headers(url):
conf_headers = config.instance.get('content.headers.custom', url=url)
for header, value in conf_headers.items():
headers[header.encode('ascii')] = value.encode('ascii')
encoded_header = header.encode('ascii')
encoded_value = b"" if value is None else value.encode('ascii')
headers[encoded_header] = encoded_value
accept_language = config.instance.get('content.headers.accept_language',
url=url)

View File

@ -616,6 +616,7 @@ content.headers.custom:
valtype:
name: String
encoding: ascii
none_ok: true
none_ok: true
supports_pattern: true
desc: Custom headers for qutebrowser HTTP requests.