Merge pull request #4463 from mvanaltvorst/donottrack
Remove outdated X-Do-Not-Track
This commit is contained in:
commit
5fdcaefbbe
@ -79,6 +79,7 @@ Fixed
|
|||||||
- When `scrolling.bar = True` was set in versions before v1.5.0, this now
|
- When `scrolling.bar = True` was set in versions before v1.5.0, this now
|
||||||
correctly gets migrated to `always` instead of `when-searching`.
|
correctly gets migrated to `always` instead of `when-searching`.
|
||||||
- Completion highlighting now works again on Qt 5.11.3 and 5.12.1.
|
- Completion highlighting now works again on Qt 5.11.3 and 5.12.1.
|
||||||
|
- The outdated header `X-Do-Not-Track` is no longer sent.
|
||||||
|
|
||||||
v1.5.2
|
v1.5.2
|
||||||
------
|
------
|
||||||
|
@ -42,7 +42,6 @@ def custom_headers(url):
|
|||||||
if dnt_config is not None:
|
if dnt_config is not None:
|
||||||
dnt = b'1' if dnt_config else b'0'
|
dnt = b'1' if dnt_config else b'0'
|
||||||
headers[b'DNT'] = dnt
|
headers[b'DNT'] = dnt
|
||||||
headers[b'X-Do-Not-Track'] = dnt
|
|
||||||
|
|
||||||
conf_headers = config.instance.get('content.headers.custom', url=url)
|
conf_headers = config.instance.get('content.headers.custom', url=url)
|
||||||
for header, value in conf_headers.items():
|
for header, value in conf_headers.items():
|
||||||
|
@ -331,19 +331,16 @@ Feature: Various utility commands.
|
|||||||
When I set content.headers.do_not_track to true
|
When I set content.headers.do_not_track to true
|
||||||
And I open headers
|
And I open headers
|
||||||
Then the header Dnt should be set to 1
|
Then the header Dnt should be set to 1
|
||||||
And the header X-Do-Not-Track should be set to 1
|
|
||||||
|
|
||||||
Scenario: DNT header (off)
|
Scenario: DNT header (off)
|
||||||
When I set content.headers.do_not_track to false
|
When I set content.headers.do_not_track to false
|
||||||
And I open headers
|
And I open headers
|
||||||
Then the header Dnt should be set to 0
|
Then the header Dnt should be set to 0
|
||||||
And the header X-Do-Not-Track should be set to 0
|
|
||||||
|
|
||||||
Scenario: DNT header (unset)
|
Scenario: DNT header (unset)
|
||||||
When I set content.headers.do_not_track to <empty>
|
When I set content.headers.do_not_track to <empty>
|
||||||
And I open headers
|
And I open headers
|
||||||
Then the header Dnt should be set to <unset>
|
Then the header Dnt should be set to <unset>
|
||||||
And the header X-Do-Not-Track should be set to <unset>
|
|
||||||
|
|
||||||
Scenario: Accept-Language header
|
Scenario: Accept-Language header
|
||||||
When I set content.headers.accept_language to en,de
|
When I set content.headers.accept_language to en,de
|
||||||
|
@ -26,18 +26,15 @@ from qutebrowser.browser import shared
|
|||||||
|
|
||||||
@pytest.mark.parametrize('dnt, accept_language, custom_headers, expected', [
|
@pytest.mark.parametrize('dnt, accept_language, custom_headers, expected', [
|
||||||
# DNT
|
# DNT
|
||||||
(True, None, {}, {b'DNT': b'1', b'X-Do-Not-Track': b'1'}),
|
(True, None, {}, {b'DNT': b'1'}),
|
||||||
(False, None, {}, {b'DNT': b'0', b'X-Do-Not-Track': b'0'}),
|
(False, None, {}, {b'DNT': b'0'}),
|
||||||
(None, None, {}, {}),
|
(None, None, {}, {}),
|
||||||
# Accept-Language
|
# Accept-Language
|
||||||
(False, 'de, en', {}, {b'DNT': b'0', b'X-Do-Not-Track': b'0',
|
(False, 'de, en', {}, {b'DNT': b'0', b'Accept-Language': b'de, en'}),
|
||||||
b'Accept-Language': b'de, en'}),
|
|
||||||
# Custom headers
|
# Custom headers
|
||||||
(False, None, {'X-Qute': 'yes'}, {b'DNT': b'0', b'X-Do-Not-Track': b'0',
|
(False, None, {'X-Qute': 'yes'}, {b'DNT': b'0', b'X-Qute': b'yes'}),
|
||||||
b'X-Qute': b'yes'}),
|
|
||||||
# Mixed
|
# Mixed
|
||||||
(False, 'de, en', {'X-Qute': 'yes'}, {b'DNT': b'0',
|
(False, 'de, en', {'X-Qute': 'yes'}, {b'DNT': b'0',
|
||||||
b'X-Do-Not-Track': b'0',
|
|
||||||
b'Accept-Language': b'de, en',
|
b'Accept-Language': b'de, en',
|
||||||
b'X-Qute': b'yes'}),
|
b'X-Qute': b'yes'}),
|
||||||
])
|
])
|
||||||
|
Loading…
Reference in New Issue
Block a user