On Mon, Jun 04, 2007 at 10:59:41PM -0700, Bill Moseley wrote:
In a template I was using:
c.uri_for( 'path', arg1, arg2 );
where arg1 and arg2 are sometimes not defined. In that case uri_for
generates a url with two trailing slashes.
Is there a reason to keep that behavior or
I think for '' the behaviour's correct.
Not sure about undef, it doesn't strike me as a valid value. Thoughts,
anyone?
I think we can safely delete any trailing undef values. I agree for '' it
should append /s.
And it's as easy as:
### Remove trailing undef arguments.
pop @args
On Tue, Jun 05, 2007 at 06:20:33AM -0700, Bill Moseley wrote:
Hum, I can see where a single '' would be useful if you wanted to do:
$x = $c-uri_for( '/path', '' ); # include trailing slash
$x .= 'foo'; # for /path/foo
Although I'm not sure why you wouldn't
On Tue, Jun 05, 2007 at 04:12:07PM +0100, Matt S Trout wrote:
Although I'm not sure why you wouldn't just use '/foo' in that case.
Nor am I, but for e.g. DAV presence of / is significat.
Ya, my static plugin will do a redirect to /foo/ if the request is /foo and
foo
is a directory. So