Re: [web2py] Re: Change in URL args handling

2011-01-30 Thread Jonathan Lundell
On Jan 30, 2011, at 10:29 AM, villas wrote: > >> I don't think that they'll be any cleaner or shorter either way. The only >> way you'll get trailing slashes (if we end up supporting them) is by asking >> for a URL with empty trailing args. If you don't want trailing slashes, then >> don't add

[web2py] Re: Change in URL args handling

2011-01-30 Thread villas
> I don't think that they'll be any cleaner or shorter either way. The only way > you'll get trailing slashes (if we end up supporting them) is by asking for a > URL with empty trailing args. If you don't want trailing slashes, then don't > add empty args. Hi, I was mainly thinking of incoming

Re: [web2py] Re: Change in URL args handling

2011-01-28 Thread Jonathan Lundell
On Jan 28, 2011, at 10:40 AM, villas wrote: > >> The downside is that we lose the capability to have trailing args that are >> empty strings. > > Hi Jonathan, > My point is that it's only a *downside* for those that want 'trailing > args that are empty strings'. > Who is it that wants them?? We

Re: [web2py] Re: Change in URL args handling

2011-01-28 Thread pbreit
"If no one has asked for trailing slashes, why introduce a feature which has to be protected forever as backward-compatible?" Except that stripping out the trailing slash is itself a non-backwards compatible change. It may be OK, but let's be clear. I don't think the browser adds the trailing

[web2py] Re: Change in URL args handling

2011-01-28 Thread villas
> The downside is that we lose the capability to have trailing args that are > empty strings. Hi Jonathan, My point is that it's only a *downside* for those that want 'trailing args that are empty strings'. Who is it that wants them?? If we explicitly want to indicate empty args we can insert som

Re: [web2py] Re: Change in URL args handling

2011-01-28 Thread Kenneth Lundström
> Kenneth: how did you happen to notice this? How did the extra trailing slash get there in the first place? I was testing an application and was using http://domain/controller/applications/2 when I decided to start from the begining with http://domain/controller/applications but I only remove

Re: [web2py] Re: Change in URL args handling

2011-01-28 Thread Jonathan Lundell
On Jan 28, 2011, at 9:21 AM, DenesL wrote: > > > > On Jan 28, 10:59 am, Jonathan Lundell wrote: >> >> It's not so obviously a bug. > > Agreed. > >> URL('f',args=['arg1','arg2']) is /app/ctl/f/arg1/arg2 or >> /app/ctl/f/'arg1'/'arg2' (quotes added for clarity) >> >> so suppose arg2 is ''; t

[web2py] Re: Change in URL args handling

2011-01-28 Thread DenesL
On Jan 28, 10:59 am, Jonathan Lundell wrote: > > It's no so obviously a bug. Agreed. > URL('f',args=['arg1','arg2']) is /app/ctl/f/arg1/arg2 or > /app/ctl/f/'arg1'/'arg2' (quotes added for clarity) > > so suppose arg2 is ''; the consistent transformation is: > > URL('f',args=['arg1','']) -> /

Re: [web2py] Re: Change in URL args handling

2011-01-28 Thread Jonathan Lundell
On Jan 28, 2011, at 8:30 AM, villas wrote: > > Stripping out trailing slashes seems like it delivers cleaner, shorter > args. If no one has asked for trailing slashes, why introduce a > feature which has to be protected forever as backward-compatible? > > After all, if these extra args exist,

[web2py] Re: Change in URL args handling

2011-01-28 Thread villas
Hi Jonathan Stripping out trailing slashes seems like it delivers cleaner, shorter args. If no one has asked for trailing slashes, why introduce a feature which has to be protected forever as backward-compatible? After all, if these extra args exist, we're going to have to iterate through them

Re: [web2py] Re: Change in URL args handling

2011-01-28 Thread Jonathan Lundell
On Jan 28, 2011, at 4:40 AM, marius.v.niekerk wrote: > > I had another problem with url argument handling that came in was > > "/app/controller/function/arg1\r". > > The default regex matching ( regex_args.match(request.raw_args( )) for > the arguments would return false and then the application

Re: [web2py] Re: Change in URL args handling

2011-01-28 Thread Jonathan Lundell
On Jan 28, 2011, at 6:05 AM, DenesL wrote: > > On Jan 27, 5:58 pm, Jonathan Lundell wrote: >> On Jan 27, 2011, at 12:48 PM, DenesL wrote: >> >> Still, it bothers me that arg1 == arg1/ != arg1//; > (optional) trailing slash> seems like an odd rule. >> >> Notice also that '/'.join(['arg1', '']) i

[web2py] Re: Change in URL args handling

2011-01-28 Thread DenesL
On Jan 27, 5:58 pm, Jonathan Lundell wrote: > On Jan 27, 2011, at 12:48 PM, DenesL wrote: > > Still, it bothers me that arg1 == arg1/ != arg1//; (optional) trailing slash> seems like an odd rule. > > Notice also that '/'.join(['arg1', '']) is 'arg1/', not 'arg1//'. True. Moreover URL('f',args=

[web2py] Re: Change in URL args handling

2011-01-28 Thread marius.v.niekerk
I had another problem with url argument handling that came in was "/app/controller/function/arg1\r". The default regex matching ( regex_args.match(request.raw_args( )) for the arguments would return false and then the application would respond with an "invalid request" error. It is not obvious f

Re: [web2py] Re: Change in URL args handling

2011-01-27 Thread Jonathan Lundell
On Jan 27, 2011, at 12:48 PM, DenesL wrote: > Now, trailing slashes are stripped, so the first two examples about give ['arg1'], as does /a/c/f/arg1/ >> >>> Maybe that should be parsed as ['arg1', '', '', '', ''] >> >> Maybe, but it seems to me that it's confusing unless we also r

[web2py] Re: Change in URL args handling

2011-01-27 Thread DenesL
> >> Now, trailing slashes are stripped, so the first two examples about give > >> ['arg1'], as does /a/c/f/arg1/ > > > Maybe that should be parsed as ['arg1', '', '', '', ''] > > Maybe, but it seems to me that it's confusing unless we also recognize a > single trailing slash as an empty arg.

Re: [web2py] Re: Change in URL args handling

2011-01-27 Thread Jonathan Lundell
On Jan 27, 2011, at 11:54 AM, DenesL wrote: > Hi Jonathan, > > On Jan 27, 12:04 am, Jonathan Lundell wrote: >> This applies to both the old and new URL rewrite paths, regardless of >> whether there's any rewriting going on. >> >> Previously, a trailing slash after args would cause an extra ar

[web2py] Re: Change in URL args handling

2011-01-27 Thread DenesL
Hi Jonathan, On Jan 27, 12:04 am, Jonathan Lundell wrote: > This applies to both the old and new URL rewrite paths, regardless of whether > there's any rewriting going on. > > Previously, a trailing slash after args would cause an extra arg to be added > to the list with a value of '' (empty st

[web2py] Re: Change in URL args handling

2011-01-27 Thread Massimo Di Pierro
Correct. I am trying to close the majority of open issues are release 1.92 next week. On Jan 27, 9:21 am, Jonathan Lundell wrote: > On Jan 27, 2011, at 6:16 AM, cjrh wrote: > > > > > On Jan 27, 7:04 am, Jonathan Lundell wrote: > >> This applies to both the old and new URL rewrite paths, regardle

Re: [web2py] Re: Change in URL args handling

2011-01-27 Thread Jonathan Lundell
On Jan 27, 2011, at 6:16 AM, cjrh wrote: > > On Jan 27, 7:04 am, Jonathan Lundell wrote: >> This applies to both the old and new URL rewrite paths, regardless of >> whether there's any rewriting going on. > > I had another fight with the old routes.py yesterday. Is there any > kind of timelin

[web2py] Re: Change in URL args handling

2011-01-27 Thread cjrh
On Jan 27, 7:04 am, Jonathan Lundell wrote: > This applies to both the old and new URL rewrite paths, regardless of whether > there's any rewriting going on. I had another fight with the old routes.py yesterday. Is there any kind of timeline on the new router making it into stable? :))