diff MoinMoin/Page.py @ 6006:748a41f12915

use http status 302 for #redirect processing instruction
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 04 Jan 2014 18:24:56 +0100
parents be11f1e64e73
children 54dc774ff49b
line wrap: on
line diff
--- a/MoinMoin/Page.py	Sat Nov 30 19:47:54 2013 +0100
+++ b/MoinMoin/Page.py	Sat Jan 04 18:24:56 2014 +0100
@@ -1037,7 +1037,11 @@
             redirect_url = Page(request, pagename).url(request,
                                                        querystr={'action': 'show', 'redirect': self.page_name, },
                                                        anchor=anchor)
-            request.http_redirect(redirect_url, code=301)
+            # we do NOT use 301 as a page edit may change the redirect to
+            # another target or even remove it again. so we can't really say
+            # it is permanent (301) or we might run into issues with clients
+            # like chrome that cache permanent redirects.
+            request.http_redirect(redirect_url, code=302)
             return
 
         # if necessary, load the formatter