There is no HTTP code for censorship (but perhaps there should be)
To quote Chris Applegate: "There is no HTTP code for censorship." But perhaps there should be.
My ISP have recently been ordered to censor The Pirate Bay. They have done so unwillingly and, it would seem, have complied only with the letter of the ruling. Their block is, for now, trivial to circumvent.
I am concerned that this censorship will become more prevalent. As network neutrality dies, we will see more sites ordered to be blocked by governments who fear what they cannot understand.
However, chief among my concerns is the technical way this censorship is implemented. At the moment, my ISP serves up an HTTP 403 error.
$ wget -v thepiratebay.org Resolving thepiratebay.org... 194.71.107.50 Connecting to thepiratebay.org|194.71.107.50|:80... connected. HTTP request sent, awaiting response... 403 Forbidden
As far as I am concerned, this response is factually incorrect.
According to the W3C Specifications:
The 4xx class of status code is intended for cases in which the client seems to have erred.
Now, I haven't made an error when making this request. Furthermore:
The server understood the request, but is refusing to fulfill it.
In this case, the server did not even see the request. It was intercepted by my ISP and rejected by them on legal grounds.
The W3C aren't the only people who can define HTTP status codes - Twitter introduced the 420 code for example. Wikipedia has a fairly comprehensive list of HTTP status codes.
So, what HTTP code should ISPs - or others - serve up to indicate to the user that censorship is abound?
1xx
Informational Request received, continuing process This class of status code indicates a provisional response,
Proposal
HTTP 112 - Emergency. Censorship in action.
Censorship is an Internet Emergency and should be treated as such.
112 is the emergency services number throughout Europe (may be confusing / irrelevant for non-Europeans).
2xx
This class of status code indicates that the client's request was successfully received, understood, and accepted.
Totally inappropriate. The request was not accepted - even assuming it was successfully received.
3xx
This class of status code indicates that further action needs to be taken by the user agent in order to fulfill the request.
Again, probably not appropriate (although one could argue that the user needs take action against her government or ISP).
Edit
As suggested by nabsltd on Slashdot the ISP could helpfully tell the user how to proxy around the censorship.
305 Use Proxy Location: https://tpb.pirateparty.org.uk/
4xx
The 4xx class of status code is intended for cases in which the client seems to have erred.
Normally, I'd be against placing the error here - however Microsoft have introduced the HTTP 450 status code "Blocked by Parental Controls"
Proposal
HTTP 460 - Blocked by Repressive Regime. (edit - IonOtter suggests the much more timely HTTP 451.>)
5xx
Response status codes beginning with the digit "5" indicate cases in which the server is aware that it has erred or is incapable of performing the request
This could be appropriate if it is the server which is performing the censorship. If Google was forbidden to show pictures to Tienanmen Square, for example.
Proposal
HTTP 560 - Server is being censored.
9xx
There are currently no valid HTTP codes in the 9xx range. I am of the opinion that censorship is such an existential threat to the web that it requires
Proposal
HTTP 911 - Internet Emergency. The provider of this connection is being forced to censor this request.
Of course, 911 is only the emergency services number in North America and other places but is sufficiently well known globally to be recognisable.
Pick A Winner
Choose an option or stick a comment in the box below.

Update 2012-06-12
The inimitable Tim Bray has submitted an RFC to the IETF HTTP working group for HTTP 451. Ongoing discussion on Hacker News, Ter Verge, and in Spanish on meneame and ADSLzone, in Russian on habrahabr, in German on NetzPolitik, and in French.
kis says:
Oli says:
Chris B says:
Chris B says:
Oli says:
Alan says:
ChrisB says:
Red says:
Chris B says:
Hymer X. says:
BR Friend says:
S0litaire says:
Darkhog says:
Oli says:
@cassandra_7 says:
Steve says:
Chris B says:
Alex says:
ChrisB says:
Oli says:
Ne says:
451 Unavailable for Legal Reasons of Resource magnet:?xt=urn:ed2k:354B15E68FB8F36D7CD88FF94116CDC1&xl=10826029
That way would be more transparent what is being censored if providing that info is not also censored. 😉klg says:
Martin says:
klg says:
.tomi says:
.tomi says:
klg says: