while filing (and trying to fix) #31430 I noticed that the class
`HttpResponsePermanentRedirect` in django.http.response has its
`status_code` set to `301`.
According to the `http` python module and more specifically RFC 7238
([https://tools.ietf.org/html/rfc7238]) the name `PermanentRedirect` is
used to describe the HTTP Status code `308`. `301` is called
`MovedPermanently` according to RFC 7231
([https://tools.ietf.org/html/rfc7231#section-6.4.2]).
Therefore I propose to rename the class `HttpResponsePermanentRedirect` to
`HttpResponseMovedPermanently` with a status code of `301` and to modify
the existing class to have a status code of `308`. I am aware that this is
backwards incompatible and will break 33 currently existing tests (I
tested it real quick locally) and probably countless uses in tests.
However I think it is important to comply with the official spec.
I would appreciate any feedback, I don't know who would be responsible for
this kind of ticket so I cannot assign it directly.
If desired, I could probably come up with a patch or at least help with
creating one.
Regards,
Jacob
--
Ticket URL: <https://code.djangoproject.com/ticket/31432>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => wontfix
* component: Uncategorized => HTTP handling
Comment:
RFC 7238 is still experimental and as you already mentioned this change is
strongly backward incompatible. Moreover 307/308 do not allow changing the
request method from POST to GET. Deprecation process would be quite
complicated. Please start a discussion on the DevelopersMailingList, we
can re-open this ticket if we reach a consensus on a mailing list.
Related to #30582.
--
Ticket URL: <https://code.djangoproject.com/ticket/31432#comment:1>