In trunk too. :-)

On Thursday, 28 June 2012 09:29:35 UTC-5, Corne Dickens wrote:
>
> Hi,
>
> There are a few places in the code which are a bit buggy (it looks like 
> code that should be 'changed' already but where skipped)
>
> It is about parsing the extension from the erquest url. In some places 
> rsplit is used (which is correct) but in other places split is used which 
> can cause problems in some situations.
> Should be nice if this will be fixed in the next release..
>
> diff -u -r web2py/gluon/compileapp.py ../web2py/gluon/compileapp.py       
>          
> --- web2py/gluon/compileapp.py  2012-03-04 23:11:41.000000000 +0100       
>          
> +++ ../web2py/gluon/compileapp.py       2012-05-01 16:37:18.902869042 +
> 0200        
> @@ -128,7 +128,7 @@                                                       
>          
>      attr['_id']=target                                                   
>          
>      request = current.request                                           
>           
>      if '.' in f:                                                         
>          
> -        f, extension = f.split('.',1)                                   
>           
> +        f, extension = f.rsplit('.',1)                                   
>          
>      if url or ajax:                                                     
>           
>          url = url or URL(request.application, c, f, r=request,           
>          
>                           args=args, vars=vars, extension=extension,     
>           
> @@ -235,7 +235,7 @@                                                       
>          
>          attr['_id']=target                                               
>          
>          request = self.environment['request']                           
>           
>          if '.' in f:                                                     
>          
> -            f, extension = f.split('.',1)                               
>           
> +            f, extension = f.rsplit('.',1)                               
>          
>          if url or ajax:                                                 
>           
>              url = url or html.URL(request.application, c, f, r=request,      
>     
>                                    args=args, vars=vars, extension=
> extension,      
> diff -u -r web2py/gluon/html.py ../web2py/gluon/html.py                   
>          
> --- web2py/gluon/html.py        2012-03-04 23:11:41.000000000 +0100       
>          
> +++ ../web2py/gluon/html.py     2012-05-01 16:35:18.138211870 +0200       
>          
> @@ -266,7 +266,7 @@                                                       
>          
>          else:                                                           
>           
>              function = f                                                 
>          
>          if '.' in function:                                             
>           
> -            function, extension = function.split('.', 1)
> +            function, extension = function.rsplit('.', 1)
>
>      function2 = '%s.%s' % (function,extension or 'html')
>
>
>
>
>

Reply via email to