This fix addresses an incompatibility with Chrome
This commit is contained in:
parent
dabda6732f
commit
d8d4a637f4
|
@ -249,13 +249,11 @@ class WebPusher:
|
|||
# use ';' instead of ',' to append the headers.
|
||||
# see https://github.com/webpush-wg/webpush-encryption/issues/6
|
||||
crypto_key += ';'
|
||||
crypto_key += (
|
||||
"keyid=p256dh;dh=" + encoded["crypto_key"].decode('utf8'))
|
||||
crypto_key += ("dh=" + encoded["crypto_key"].decode('utf8'))
|
||||
headers.update({
|
||||
'crypto-key': crypto_key,
|
||||
'content-encoding': content_encoding,
|
||||
'encryption': "keyid=p256dh;salt=" +
|
||||
encoded['salt'].decode('utf8'),
|
||||
'encryption': "salt=" + encoded['salt'].decode('utf8'),
|
||||
})
|
||||
if gcm_key:
|
||||
endpoint = 'https://android.googleapis.com/gcm/send'
|
||||
|
|
|
@ -265,7 +265,7 @@ class WebpushTestCase(unittest.TestCase):
|
|||
"-H \"crypto-key: p256ecdsa=",
|
||||
"-H \"content-encoding: aesgcm\"",
|
||||
"-H \"authorization: WebPush ",
|
||||
"-H \"encryption: keyid=p256dh;salt=",
|
||||
"-H \"encryption: salt=",
|
||||
"-H \"ttl: 0\"",
|
||||
"-H \"content-length:"
|
||||
]:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
cryptography==1.8.1
|
||||
http-ece==1.0.1
|
||||
requests==2.13.0
|
||||
py-vapid==1.2.1
|
||||
py-vapid==1.2.2
|
||||
|
|
Loading…
Reference in New Issue