iftekharjoy / webapp-improved

Automatically exported from code.google.com/p/webapp-improved
Other
0 stars 0 forks source link

Redirect Route strict_slash fails on POST #96

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Map a URL using Redirect Route and set strict_slash=True

RedirectRoute("/some/address", MyHandler, name="handler", strict_slash=True)

2. Have the URL map to a handler that has post implemented

class MyHandler:
    def post(self):
         #stuff here

3. Make a REST POST request to the URL with a trailing slash

What is the expected output? What do you see instead?
I'd expect the POST call to reach the post method. Instead I get a 405 error, 
which I don't see if I removed the trailing slash. I also don't see this if the 
HTTP verb is GET. 

What version of the product are you using? On what operating system?
webapp2 2.5.1, MAC OS X 10.8.3

Please provide any additional information below.
The behavior also happens when the URL mapping has a trailing slash and the 
POST request does not. 

Original issue reported on code.google.com by an...@striiv.com on 7 Oct 2014 at 11:58

GoogleCodeExporter commented 8 years ago
I am having a similar issue writing a handler for HEAD requests. It's sending 
405 response instead of a redirect.

Original comment by m...@photo-mark.com on 27 Jan 2015 at 12:44