WordPress / WordPress/Requests
URL reformatting issue with Requests_IRI
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 500
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 5
Description
When requesting an URL with a fragment, the reformatted URL can be different from the original one. The following example rewrites https://example.com/#foobar to https://example.com#foobar instead of returning the same URL.
As a consequence, curl fails to load the URL.
$url = "https://example.com/#foobar";
$iri = new Requests_IRI($url);
$url = $iri->uri;
var_dump($url);
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 with the Requests_IRI constructor and its URL reformatting path, using the provided fragment example as the reproducer. Verify that https://example.com/#foobar remains unchanged and that curl can load the resulting URL; add or update a regression test if the repository's existing test location is identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100