Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect Route strict_slash fails on POST #96

Open
GoogleCodeExporter opened this issue May 5, 2015 · 1 comment
Open

Redirect Route strict_slash fails on POST #96

GoogleCodeExporter opened this issue May 5, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 7 Oct 2014 at 11:58

@GoogleCodeExporter
Copy link
Author

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

Original comment by [email protected] on 27 Jan 2015 at 12:44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant