Skip to content

Commit 3aea47f

Browse files
author
Hubot
committed
Sync changes from upstream repository
1 parent 8250589 commit 3aea47f

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: The 451 status code is now supported
3+
author_name: gjtorikian
4+
---
5+
6+
In December 2015, [the IETF ratified status code `451`](https://datatracker.ietf.org/doc/rfc7725/). A `451` response indicates that a resource is unavailable due to an external legal request.
7+
8+
The GitHub API will now respond with a `451` status code for resources it has been asked to take down due to a DMCA notice. For example:
9+
10+
``` command-line
11+
$ curl https://api.github.com/repos/github/a-repository-that-s-been-taken-down
12+
> HTTP/1.1 451
13+
> Server: GitHub.com
14+
15+
> {
16+
> "message": "Repository access blocked",
17+
> "block": {
18+
> "reason": "dmca",
19+
> "created_at": "2016-03-17T15:39:46-07:00"
20+
> }
21+
> }
22+
```
23+
24+
This `451` code will be returned for repositories and gists. Previously, the API responded with a `403 - Forbidden`. Aside from the semantic difference, we feel that it's important for users to know precisely why their data cannot be served.
25+
26+
If you're receiving a `451` due to a DMCA takedown, please read our article on [submitting a DMCA counter notice](https://help.github.com/articles/guide-to-submitting-a-dmca-counter-notice/) and know your rights. For more information, see [GitHub's DMCA Takedown Policy](https://help.github.com/articles/dmca-takedown-policy/).

0 commit comments

Comments
 (0)