Extended @removeslash also to CRUD #70 #81

Merged
merged 2 commits into from Dec 5, 2012
+5 −1
Split
View
@@ -688,3 +688,7 @@ Thanks to (in no particular order):
- `Gautam Jeyaraman <https://github.com/gautamjeyaraman>`_
- Minor code fixes and patches
+
+- `DhilipSiva <https://github.com/dhilipsiva>`_
+
+ - Minor patches
View
@@ -1087,7 +1087,7 @@ def removeslash(method):
@functools.wraps(method)
def wrapper(self, *args, **kwargs):
if self.request.path.endswith("/"):
- if self.request.method in ("GET", "HEAD"):
+ if self.request.method in ("GET", "HEAD", "POST", "PUT", "DELETE"):
uri = self.request.path.rstrip("/")
if uri: # don't try to redirect '/' to ''
if self.request.query: