diff src/server/pages.py @ 1015:16d52917666c

pages: fixed redirection
author Goffi <goffi@goffi.org>
date Fri, 19 Jan 2018 18:01:58 +0100
parents dfced7992460
children 78af5457d3f8
line wrap: on
line diff
--- a/src/server/pages.py	Fri Jan 19 18:01:01 2018 +0100
+++ b/src/server/pages.py	Fri Jan 19 18:01:58 2018 +0100
@@ -370,7 +370,7 @@
         return os.path.join(self.url, *url_args)
 
     def getCurrentURL(self, request):
-        """retrieve URL use to access this page
+        """retrieve URL used to access this page
 
         @return(unicode): current URL
         """
@@ -655,7 +655,7 @@
             else:
                 redirect_page = redirect_page.original.children[subpage]
 
-        redirect_page.renderPage(request, skip_parse_url=True)
+        redirect_page.renderPage(request, skip_parse_url=skip_parse_url)
         raise failure.Failure(exceptions.CancelError(u'page redirection is used'))
 
     def pageError(self, request, code=C.HTTP_NOT_FOUND):
@@ -969,7 +969,7 @@
         d.addCallback(self._checkAccess, request)
 
         if self.redirect is not None:
-            self.pageRedirect(self.redirect, request, skip_parse_url=False)
+            d.addCallback(lambda dummy: self.pageRedirect(self.redirect, request, skip_parse_url=False))
 
         if self.parse_url is not None and not skip_parse_url:
             d.addCallback(self.parse_url, request)