Make $supportedContentEncodings publicly available or implement encoding negotiation
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start with Minishlink\WebPush\Subscription's constructor, its content-encoding validation, and the create() method mentioned in the request. First determine whether the project wants a public supported-encoding accessor or internal negotiation, then define how browser-provided encodings should be supplied and how the chosen behavior can be verified.
Written by the indexing model from the issue text.
Description
This is feature request:
Minishlink\WebPush\Subscription in constructor checks $contentEncoding against local variable. That prevents setting unsupported value, but there is no way for developer to easily find encoding which is supported by both browser and library.
Some developers still use default value 'aesgcm', other pass first supported encoding if browser supports PushManager.supportedContentEncodings. In first case, code will fail if some browser drop support for 'aesgcm' and in second case, it will fail if browser implement and prefer new encoding.
I have two possible solutions for this:
1.) Make it protected/private property with public getter. That way, developer can make encoding negotiation with browser externally.
2.) Make negotiation internally in constructor (which would require changing signature) or in create() method by accepting array of encodings, taking first supported one from array.
P.S. Sorry for closing and reopening, I missclicked submit, so closed while completing text.
- Dominant language
- PHP
- Stars
- 1.9k
- Forks
- 312
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
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.
More from web-push-libs/web-push-php
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
web-push-libs/web-push-php#441 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
web-push-libs/web-push-php#430 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
web-push-libs/web-push-php#429 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
web-push-libs/web-push-php#412 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
web-push-libs/web-push-php#411 · 5 comments ·
All issues in web-push-libs/web-push-php
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Awaiting Triage
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
WordPress/two-factor#1008 ·
Maintainers usually reply within 1 day
-
sync-en
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day