Dancer2 icon indicating copy to clipboard operation
Dancer2 copied to clipboard

Should `uri_for` avoid prepending the base URI to absolute URIs?

Open fgabolde opened this issue 10 years ago • 0 comments

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.

fgabolde avatar Jun 12 '15 09:06 fgabolde