WordPress / WordPress/Requests
Requests class: review and improve decompression methods
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 500
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 5
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.
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.
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.
Assessment
- Tech stack
- php
- Domain
- backend, testing-qa
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100