400 Bad Request when TTL=0

Duplicate Issue #16377406 • See Issue #16377404

Details

Author
Nobuhiro I.
Created
Mar 14, 2018
Privacy
This issue is public.
Found in
  • Microsoft Edge
Duplicates
See progress on Bug #16377404
Found in build #
42.17115
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

I tried WebPush request with Ttl: 0, returned 400 Bad Request from server.
(Tried with ruby’s webpush gem https://github.com/zaru/webpush )

$ irb
> require 'webpush'
=> true
> Webpush.payload_send(
*   message: '{"alert":"test","sound":"default","mid":"14"}',
*   endpoint: "https://sg2p.notify.windows.com/w/?token=BAYAAABJYmSfhIaTbWrDvEzFQG20sP3ytppiD6qEJs%2ffyAA6YNZmHt3R0jQoeC5ErJOuXysVNglc5dkduncDIQL3SKI7d1MWgbe2vl6lFGQPV4tZmCEO9bGMkXfEb3DrZHJcAgP6sx9YrepbKS1mdN5VadlIlZ5cfRXHGNY7p8fItXz8Xt9JVPXfEJm3wYbMTvzEugOSPgYKr3yl3oj5rtsO1OVhYnzqRYui%2fdnAI2qWOGwdvVXLwrfbfsIMAjuhAzJZj0LiyVsNKqbKMUEsgjIpwNv4eQOd4lEiNWJt7YO5PcQjODLGT%2fISH0JSPUj310WukHLOvIgg2znvKl0FiJD8oAyK",
*   p256dh: "BJlIRy-UwWscpJNn7EPZw5xvEvwBktRcnbOp4oDlm-uHdydViiQWhYtAhfpY3CXIJxNZuSOHJ7oPFEGarfTeYII",
*   auth: "8hePdiwEEb0-OuamxI0-rg",
*   vapid: {
*     subject: "mailto:boltzengine@fenrir.co.jp",
*     public_key: 'BPa8W_PMPbCzECDkZ6lOyGl_dOqhJI2Vrr_RKx-lOsf342YiWH3xadlCJwYlQ_65tCt2Z2f8QbCWAK0IugGJdiA',
*     private_key: 'XAB_CgvuDufq22OzU0SDvASZNEIMIoacY8KY9_1_ii8'
*   }
* )
=> #<Net::HTTPCreated 201 Created readbody=true>
> Webpush.payload_send(
*   message: '{"alert":"test","sound":"default","mid":"14"}',
*   endpoint: "https://sg2p.notify.windows.com/w/?token=BAYAAABJYmSfhIaTbWrDvEzFQG20sP3ytppiD6qEJs%2ffyAA6YNZmHt3R0jQoeC5ErJOuXysVNglc5dkduncDIQL3SKI7d1MWgbe2vl6lFGQPV4tZmCEO9bGMkXfEb3DrZHJcAgP6sx9YrepbKS1mdN5VadlIlZ5cfRXHGNY7p8fItXz8Xt9JVPXfEJm3wYbMTvzEugOSPgYKr3yl3oj5rtsO1OVhYnzqRYui%2fdnAI2qWOGwdvVXLwrfbfsIMAjuhAzJZj0LiyVsNKqbKMUEsgjIpwNv4eQOd4lEiNWJt7YO5PcQjODLGT%2fISH0JSPUj310WukHLOvIgg2znvKl0FiJD8oAyK",
*   p256dh: "BJlIRy-UwWscpJNn7EPZw5xvEvwBktRcnbOp4oDlm-uHdydViiQWhYtAhfpY3CXIJxNZuSOHJ7oPFEGarfTeYII",
*   auth: "8hePdiwEEb0-OuamxI0-rg",
*   ttl: 0,
*   vapid: {
*     subject: "mailto:boltzengine@fenrir.co.jp",
*     public_key: 'BPa8W_PMPbCzECDkZ6lOyGl_dOqhJI2Vrr_RKx-lOsf342YiWH3xadlCJwYlQ_65tCt2Z2f8QbCWAK0IugGJdiA',
*     private_key: 'XAB_CgvuDufq22OzU0SDvASZNEIMIoacY8KY9_1_ii8'
>   }
> )
Webpush::ResponseError: host: sg2p.notify.windows.com, #<Net::HTTPBadRequest 400 Bad Request readbody=true>

I found “Message deliver to user immediately if set TTL=0” in RFC 8030 5.2. Push Message Time-To-Live.
And, Chrome and Firefox accept this request.

A Push message with a zero TTL is immediately delivered if the user
agent is available to receive the message.

Also Edge will can accept TTL=0 ?

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Arvind M.”

      Changed Assigned To from “Arvind M.” to “Ali A.”

      Changed Status to “Duplicate”

    • I am resolving this as a duplicate of Bug 16377404.

    • This bug has marked as duplicate. Please follow the parent issue to get new updates.

    You need to sign in to your Microsoft account to add a comment.

    Sign in