
The 451 status code is now supported - cujanovic
https://developer.github.com/changes/2016-03-17-the-451-status-code-is-now-supported/
======
schlowmo
Besides the reference to Fahrenheit 451 the referece to Life of Brian at the
example from the RFC made my day:

[https://tools.ietf.org/html/rfc7725#section-3](https://tools.ietf.org/html/rfc7725#section-3)

"Unavailable For Legal Reasons

This request may not be serviced in the Roman Province of Judea due to the Lex
Julia Majestatis, which disallows access to resources hosted on servers deemed
to be operated by the People's Front of Judea."

~~~
jasonjei
I wonder if China would respond favorably to the code 451 (which would be
ironic) or if they would take offense at it. If something is to be censored,
wouldn't the censor want to deny its existence?

Imagine trying to watch a movie critical of China in China--status code 451.

~~~
kijin
China doesn't try to hide the fact that they censor a huge chunk of the
Internet. In fact, they seem rather proud of it.

Perhaps they could even use 451 as an easy way to detect potential
"terrorists". Sort citizens by the number of 451s they generate each month,
send a cop to the top 1% of them, and publish this fact to scare the other
99%. They're already using TCP resets as a core component of their censorship
regime, so I wouldn't be surprised if this Internet standard got co-opted,
too.

So instead of:

    
    
        You are not in the sudoers file. This incident will be reported.
    

They'll get:

    
    
        HTTP 451. This incident will be reported.

------
dcw303
This could be really useful. If this was done by other big content sites
(Youtube for example) then a search bot could build up an index of banned
resources. A repository of burned books.

~~~
asymmetric
YouTube also bans content based on your location (e.g. In Germany), so the
index would have to take that into account.

~~~
mrweasel
I really wanted to use it when our German customer try to view product pages
for games that are illegal in Germany, but the business people said no.

~~~
legulere
You probably meant an advertising ban to under 18 year olds (no, a form asking
for your birthday isn't enough). Only very few games are actually banned, KZ
manager
([https://en.wikipedia.org/wiki/KZ_Manager](https://en.wikipedia.org/wiki/KZ_Manager))
for instance. For those only distribution is banned, possession is legal.

~~~
mrweasel
>You probably meant an advertising ban to under 18 year olds (no, a form
asking for your birthday isn't enough).

For a webshop that effectively a ban isn't it?

~~~
kuschku
No?

PayPal, EC Cards, and the eID system can do 18yo verification online.

------
chippy
"Responses using this status code SHOULD include an explanation, in the
response body, of the details of the legal demand: the party making it, the
applicable legislation or regulation, and what classes of person and resource
it applies to."

So in the articles example, GitHub should really include who is requesting the
DCMA in the response.

~~~
WillAbides
While it isn't part of the 451 response, you can see the takedown notice
submitted to GitHub. Load the blocked content in a browser and you will see a
message with a link to the takedown notice. Here's an example:
[https://github.com/popcorn-official/popcorn-app](https://github.com/popcorn-
official/popcorn-app)

~~~
Navarr
Their link to the DMCA should be included in the response. It's weird that
it's not

~~~
nicky0
It is in the body of the response. How do you make out that is is not?

~~~
Navarr
Let me edit my post.

The link to the DMCA should really be included in the __api response __

------
nothis
[https://en.wikipedia.org/wiki/Fahrenheit_451](https://en.wikipedia.org/wiki/Fahrenheit_451)

Coincidence? I think not!

~~~
ChrisArchitect
ha, was thinking the same thing - sure enough, it's totally named after that

------
TuringTest
I like the Farenheit 451 reference. Is that intentional, or does destiny have
a sense of humor?

Edit: Wikipedia knows it all, as always. [1]

[1]
[https://en.wikipedia.org/wiki/HTTP_451](https://en.wikipedia.org/wiki/HTTP_451)

------
edent
Original discussion on HN from 4 years ago
[https://news.ycombinator.com/item?id=4099751](https://news.ycombinator.com/item?id=4099751)

~~~
SilasX
I thought this was an interesting comment[1] in the context of AWS:

>If the .ru site sent 404s for nonexistent users and 451s for real ones, you'd
be able to gather potentially useful information. It's like if I go to bad-
porn.com and type your email into "forgot my password", it should neither
confirm nor deny the existence of your account, simply tell me the request was
received. In any event if delivery of the requested resource is legally
prohibited, why would I go to the trouble to determine whether the resource
exists?

>A final analogy: 10 year old enters US gas station: "Have you Marlboro 100s,
menthol?" gas station attendant (without checking whether or not he has this
particular brand/style of cigarette): "get out of here, kid. [HTTP/1.1 451
Unavailable For Legal Reasons]."

Amazon will similarly return 404 for S3 assets which exist but which you don't
have the right to see. Annoyingly, they will also do the opposite of the
cigarette analogy in the AWS console: they will gladly let you walk though the
whole process of configuring and launching an EC2 server and only reject you
at the very end because you don't have permission. Hence my "AWS bar joke":

[http://blog.tyrannyofthemouse.com/2016/02/some-of-my-
geeky-t...](http://blog.tyrannyofthemouse.com/2016/02/some-of-my-geeky-tech-
jokes-with.html)

[1]
[https://news.ycombinator.com/item?id=4100526](https://news.ycombinator.com/item?id=4100526)

------
sanqui
I was under the impression that the 451 status code should be used for
requests blocked by proxies, where the original content is technically still
available at the source but blocked for some reason. Probably got the wrong
idea.

~~~
0942v8653
To clarify this:

> This status code indicates that the server is subject to legal restrictions
> which prevent it servicing the request.

The "server" here could be a proxy server or the original, hosting server.

> The use of the 451 status code implies neither the existence nor non-
> existence of the resource named in the request. That is to say, it is
> possible that if the legal restriction were removed, a request for the
> resource might still not succeed.

~~~
mattlutze
It's like IETF's own Glomar status code.

------
apalmer
Help Me Understand:

I am a government who is censoring content. I do not like the explicitly
saying I am 'censoring' the internet I instruct my infrastructure not to use
the status code 451. and I instruct my nation's infrastructure to reject or
rewrite all responses with 451 status code to 404.

What stops me?

~~~
uremog
Nothing. This is not some kind of mandate. What the general public gets out of
it is that, for sites nice enough to use it, the viewer will know why they
cannot view something. The alternative is for them to not know why.

------
jasonjei
If I understand NSL correctly, its existence cannot be published without a
government waiver? So in the case a repo needs to be taken down due to a NSL,
what does GH do? 404? 401? 451? Returning 451 in response to a NSL would
definitely violate NSL requirements?

~~~
jessaustin
Probably 404 would best fit the intention of an NSL, although I think 400
would also be defensible.

------
ape4
This means webcrawlers/bots can now compile stats.

------
lolidaisuki
I actually saw the status code 451 in the wild.

First time I saw it was in December and after that in January, both on the
same site. The site that was blocked was archive.is.

This block was targeted at Finland and none of the different Internet
connections I tried could get to the site, I tried my home connection,
cellular and connecting from my school network. It's a shame that anyone even
thought of censoring such an useful tool for history and other legitimate
uses. I wrote a thing about it to a Finnish newspaper and a few weeks after
that the block was gone. I suspect that the newspaper conatcted archive.is and
it was removed so they don't get bad publicity.

It was kind of ironical that I had to subvert the archive.is censorship to
read an archived version of a thread discussing web censorship in Sweden.

I think this error code is a bad idea as it legitimizes censorship.

~~~
Tuna-Fish
Just to clarify: Archive.is decided to block all of Finland not because of
some Finnish legal requirement, but because the guy running it had a bad
experience in Finnish customs and wanted to have revenge of some sort. Not
really censorship.

~~~
kdamken
What a hilarious misuse of power. I hope my country doesn't piss off wikipedia
or something.

~~~
SilasX
And misuse of status code too. Rejecting a country because you had a bad
experience with them should just be the general 403 Forbidden.

~~~
CalRobert
Would've been better to use 418 if he was just being petty.

