microsoft / microsoft/WindowsAppSDK
Windows Push Notification service (WNS) returns the wrong status code for rate limiting
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 4.7k
- Forks
- 471
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 28
Description
### Describe the bug
From [your docs](https://learn.microsoft.com/en-us/windows/apps/design/shell/tiles-and-notifications/push-request-response-headers#response-codes):
> 406 Not Acceptable
> The cloud service exceeded its throttle limit.
> Please send your request after the Retry-After header value in the response
This is plain wrong and against the standard. You MUST return `429 Too Many Requests` for rate limiting.
Returning 406 breaks various web push libraries and services, that don't handle the response properly.
For example: https://github.com/zaru/webpush/pull/103
### Steps to reproduce the bug
Send many web push messages in parallel to Edge / WNS.
### Expected behavior
Return HTTP status 429 for rate limiting.
### Screenshots
_No response_
### NuGet package version
None
### Windows version
_No response_
### Additional context
_No response_
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the WNS response-code documentation and the linked webpush pull request, then reproduce rate limiting by sending many web push messages in parallel to Edge/WNS. Done means the service returns HTTP 429 Too Many Requests, with Retry-After, instead of 406 for throttled requests.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, networking
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100