space -> hyphen in Accept-Language, capatilise in test
parent
037557fbf5
commit
0268d4fc8e
|
@ -321,7 +321,7 @@ class PreviewUrlResource(DirectServeResource):
|
|||
url,
|
||||
output_stream=f,
|
||||
max_size=self.max_spider_size,
|
||||
headers={"Accept Language": self.url_preview_accept_language},
|
||||
headers={"Accept-Language": self.url_preview_accept_language},
|
||||
)
|
||||
except SynapseError:
|
||||
# Pass SynapseErrors through directly, so that the servlet
|
||||
|
|
|
@ -555,10 +555,10 @@ class URLPreviewTests(unittest.HomeserverTestCase):
|
|||
# of the request from Synapse
|
||||
self.assertIn(
|
||||
(
|
||||
b"Accept language: en-UK\r\n"
|
||||
b"Accept language: en-US;q=0.9\r\n"
|
||||
b"Accept language: fr;q=0.8\r\n"
|
||||
b"Accept language: *;q=0.7"
|
||||
b"Accept-Language: en-UK\r\n"
|
||||
b"Accept-Language: en-US;q=0.9\r\n"
|
||||
b"Accept-Language: fr;q=0.8\r\n"
|
||||
b"Accept-Language: *;q=0.7"
|
||||
),
|
||||
server.data,
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue