Allura/allura/lib/patches.py
def without_trailing_slash(func, *args, **kwargs):
        '''Monkey-patched to use 301 redirects for SEO'''
        response_type = getattr(request, 'response_type', None)
        if (request.method == 'GET' and request.path.endswith('/')
                and not response_type and len(request.params) == 0):
            raise webob.exc.HTTPMovedPermanently(location=request.url[:-1])
        return func(*args, **kwargs)
Monkey-patched to use 301 redirects for SEO
Monkey-patched to use 301 redirects for SEO
Monkey - patched to use 301 redirects for SEO
def without_trailing_slash(func, *args, **kwargs):
        response_type = getattr(request, 'response_type', None)
        if (request.method == 'GET' and request.path.endswith('/')
                and not response_type and len(request.params) == 0):
            raise webob.exc.HTTPMovedPermanently(location=request.url[:-1])
        return func(*args, **kwargs)
def without_trailing_slash ( func , * args , ** kwargs ) : response_type = getattr ( request , 'response_type' , None ) if ( request . method == 'GET' and request . path . endswith ( '/' ) and not response_type and len ( request . params ) == 0 ) : raise webob . exc . HTTPMovedPermanently ( location = request . url [ : - 1 ] ) return func ( * args , ** kwargs )
Monkey-patched to use 301 redirects for SEO
Monkey - patched to use 301 redirects for SEO
'''Monkey-patched to use 301 redirects for SEO'''
func