Merge pull request #475 from andrew-d/master
addslash / removeslash modification
This commit is contained in:
commit
cdaa99afbe
|
@ -1100,7 +1100,7 @@ def removeslash(method):
|
|||
if uri: # don't try to redirect '/' to ''
|
||||
if self.request.query:
|
||||
uri += "?" + self.request.query
|
||||
self.redirect(uri)
|
||||
self.redirect(uri, permanent = True)
|
||||
return
|
||||
else:
|
||||
raise HTTPError(404)
|
||||
|
@ -1122,7 +1122,7 @@ def addslash(method):
|
|||
uri = self.request.path + "/"
|
||||
if self.request.query:
|
||||
uri += "?" + self.request.query
|
||||
self.redirect(uri)
|
||||
self.redirect(uri, permanent = True)
|
||||
return
|
||||
raise HTTPError(404)
|
||||
return method(self, *args, **kwargs)
|
||||
|
|
Loading…
Reference in New Issue