mirror of
https://github.com/rmaake1/httpstatuses.git
synced 2024-11-02 00:32:36 +01:00
62df9e637c
* Add Python status constants * Add Python 2, Python 3+, Python 3.5+ status constants
32 lines
1.7 KiB
Markdown
32 lines
1.7 KiB
Markdown
---
|
|
set: 3
|
|
code: 301
|
|
title: Moved Permanently
|
|
references:
|
|
"Rails HTTP Status Symbol": ":moved_permanently"
|
|
"Go HTTP Status Constant": "http.StatusMovedPermanently"
|
|
"Symfony HTTP Status Constant": "Response::HTTP_MOVED_PERMANENTLY"
|
|
"Python2 HTTP Status Constant": "httplib.MOVED_PERMANENTLY"
|
|
"Python3+ HTTP Status Constant": "http.client.MOVED_PERMANENTLY"
|
|
"Python3.5+ HTTP Status Constant": "http.HTTPStatus.MOVED_PERMANENTLY"
|
|
---
|
|
|
|
The target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs.
|
|
|
|
Clients with link-editing capabilities ought to automatically re-link references to the effective request URI to one or more of the new references sent by the server, where possible.
|
|
|
|
The server SHOULD generate a Location header field in the response containing a preferred URI reference for the new permanent URI. The user agent MAY use the Location field value for automatic redirection. The server's response payload usually contains a short hypertext note with a hyperlink to the new URI(s).
|
|
|
|
Note: For historical reasons, a user agent MAY change the request method from POST to GET for the subsequent request. If this behavior is undesired, the [307 Temporary Redirect](/307) status code can be used instead.
|
|
|
|
A 301 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls<sup>[1](#ref-1)</sup>.
|
|
|
|
---
|
|
|
|
* <span id="ref-1"><sup>1</sup> Calculating Heuristic Freshness
|
|
[RFC7234 Section 4.2.2][2]</span>
|
|
* Source: [RFC7231 Section 6.4.2][1]
|
|
|
|
[1]: <http://tools.ietf.org/html/rfc7231#section-6.4.2>
|
|
[2]: <http://tools.ietf.org/html/rfc7234#section-4.2.2>
|