Move content.accept_language under headers

This commit is contained in:
Florian Bruhin 2017-07-03 15:46:33 +02:00
parent f546cbe934
commit 202b8445f6
3 changed files with 7 additions and 7 deletions

View File

@ -40,7 +40,7 @@ def custom_headers():
for header, value in config.val.content.headers.custom.items():
headers[header.encode('ascii')] = value.encode('ascii')
accept_language = config.val.content.accept_language
accept_language = config.val.content.headers.accept_language
if accept_language is not None:
headers[b'Accept-Language'] = accept_language.encode('ascii')

View File

@ -107,11 +107,6 @@ auto_save.session:
## content
content.accept_language:
type: String
default: en-US,en
desc: Value to send in the `accept-language` header.
content.cache.size:
default: null
type:
@ -211,6 +206,11 @@ content.geolocation:
type: BoolAsk
desc: Allow websites to request geolocations.
content.headers.accept_language:
type: String
default: en-US,en
desc: Value to send in the `accept-language` header.
content.headers.custom:
default: {}
type:

View File

@ -336,7 +336,7 @@ Feature: Various utility commands.
And the header X-Do-Not-Track should be set to 0
Scenario: Accept-Language header
When I set content.accept_language to en,de
When I set content.headers.accept_language to en,de
And I open headers
Then the header Accept-Language should be set to en,de