307 is just treated the same as the other redirects (301, 302, 303) and is
converted to a GET request, regardless of the original request method.
This is incorrect according to the RFCs... 307 and 308 redirects are
supposed to preserve the original method and request body, so a POST
request resulting in 307 response should cause the client to re-POST the
body to the new Location.
https://tools.ietf.org/html/rfc7231#section-6.4.7
https://tools.ietf.org/html/rfc7538#page-3
I'm happy to prepare a PR for this if it's agreed this should be changed.
--
Ticket URL: <https://code.djangoproject.com/ticket/27999>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* type: Uncategorized => New feature
* version: 1.10 => master
* component: Uncategorized => Testing framework
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/27999#comment:1>
--
Ticket URL: <https://code.djangoproject.com/ticket/27999#comment:2>
* owner: nobody => Tom
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/27999#comment:3>
* has_patch: 0 => 1
Comment:
PR: https://github.com/django/django/pull/8531
--
Ticket URL: <https://code.djangoproject.com/ticket/27999#comment:4>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/27999#comment:5>
* needs_better_patch: 1 => 0
Comment:
Not sure if I'm meant to remove this flag myself after I've made the
changes the reviewer requested, please let me know if not.
--
Ticket URL: <https://code.djangoproject.com/ticket/27999#comment:6>
* needs_better_patch: 0 => 1
Comment:
It's fine to clear the "patch needs improvement" flag yourself, since
that's one of the main ways reviewers can spot that it's ready to re-
review. As it happens, there are a couple more style issues (not from me)
on the patch, so I'm going to set this again for now.
--
Ticket URL: <https://code.djangoproject.com/ticket/27999#comment:7>
* needs_better_patch: 1 => 0
Comment:
Thanks! I've made some changes based on the reviews
--
Ticket URL: <https://code.djangoproject.com/ticket/27999#comment:8>
* stage: Accepted => Ready for checkin
Comment:
OK. Patch looks good.
--
Ticket URL: <https://code.djangoproject.com/ticket/27999#comment:9>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"272f685794de0b8dead220ee57b30e65c9aa097c" 272f685]:
{{{
#!CommitTicketReference repository=""
revision="272f685794de0b8dead220ee57b30e65c9aa097c"
Fixed #27999 -- Added test client support for HTTP 307 and 308 redirects.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27999#comment:10>