PerlDancer / PerlDancer/Dancer2
Should `uri_for` avoid prepending the base URI to absolute URIs?
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 604
- Forks
- 288
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 5
Description
Currently if you do something weird like
$request->uri_for('http://example.com')
it just tries to rebase the argument anyway:
http://localhost:5000/mountpoint/http://example.com
I'd argue that this is never what the user wants, so the method should either throw an exception or not rebase the argument (returning "http://example.com" unchanged).
For selfish reasons I prefer the second option. Possibly both options should be provided by different methods.
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 locating the uri_for implementation and reproduce the absolute-URI example to confirm the current rebasing behavior. Resolve whether the project should return absolute URIs unchanged or raise an exception, then add regression coverage and verify the chosen behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100