Alexander Shorin created COUCHDB-2960:
-----------------------------------------

             Summary: Support RFC 7725 (HTTP 451)
                 Key: COUCHDB-2960
                 URL: https://issues.apache.org/jira/browse/COUCHDB-2960
             Project: CouchDB
          Issue Type: New Feature
          Components: Database Core, HTTP Interface
            Reporter: Alexander Shorin


Recently [HTTP 451 | http://tools.ietf.org/html/rfc7725] response status code 
was made as a standard one. Due to global trends on Internet filtration and 
censorship, I think we should support this initiative.

Proposal:
1. Trivial. Let 451 response status get counted by stats. So users may return 
{{\{code: 451, body: 'sorry, DMCA'\}}} and these will be counted correctly. How 
they will decide when to 451 and when to not it's up to user implementation.

2. Advanced. Introduce new special field like {{_down_by_legal_reason}} 
(bikeshedding) which is an object and contains the reason why and reference to 
the blocking statement. Like:

{code}
{
  "_id": "Game of Thrones",
  "_attachments": {
    "S4E01": {...}
  },
  "_down_by_legal_reasons": {
    "link": "http://somewhere.else/issue/123";,
    "reason": "Piracy is bad",
  },
  "type": "serial",
}
{code}

The data from a link subfield goes to {{Link}} response header as RFC suggests. 
Documents with {{_down_by_legal_reason}} field cannot be browsed by regular 
users, only admins may work with them. Additionally we can make them 
non-replicable, but I don't think that you want to run replication using db 
admin credentials by security reasons.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to