Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Redirect Route strict_slash fails on POST #96

Open
GoogleCodeExporter opened this issue Feb 26, 2016 · 1 comment
Open

Redirect Route strict_slash fails on POST #96

GoogleCodeExporter opened this issue Feb 26, 2016 · 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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant