Requests class: review and improve decompression methods
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Refactor
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- php
- Domain
- backend, testing-qa
Research direction
Start by reading the DecompressionTest test class and the implementations of Requests::compatible_gzinflate() and Requests::decompress(), including Requests::$magic_compression_headers. Compare the covered and unreachable paths described in #595; done means the intended responsibilities are clarified and the relevant decompression and ZIP-handling behavior has focused test coverage.
Written by the indexing model from the issue text.
Description
As per #595:
The methods covered via the
DecompressionTesttest class need a lot more tests, in particular theRequests::compatible_gzinflate()method, which includes code paths currently completely untested and handling of ZIP file format, which when called fromRequests::decompress()(which is the only way it is called from within the Requests library itself), can never be reached as the "magic markers" used by ZIP are not included in theRequests::$magic_compression_headersproperty.A future iteration should do a more in-depth review of these two method to determine what should be handled by each method and add additional tests.
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 500
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 5
Contributor 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 WordPress/Requests
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Status: help wanted Type: testing/chores/QA
Difficulty 4/5 3-5 days Newbie friendliness 62/100
-
Type: meta
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Component: Transports Status: help wanted Type: testing/chores/QA
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Component: Core Type: enhancement
Difficulty 3/5 1-2 days Newbie friendliness 64/100
All issues in WordPress/Requests
Similar issues
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/static-site-importer#1767 ·