Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2672C9763 for ; Mon, 20 Feb 2012 10:02:37 +0000 (UTC) Received: (qmail 65813 invoked by uid 500); 20 Feb 2012 10:02:36 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 65618 invoked by uid 500); 20 Feb 2012 10:02:36 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 65610 invoked by uid 99); 20 Feb 2012 10:02:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Feb 2012 10:02:36 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.220.180] (HELO mail-vx0-f180.google.com) (209.85.220.180) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Feb 2012 10:02:29 +0000 Received: by vcbfo1 with SMTP id fo1so4869367vcb.11 for ; Mon, 20 Feb 2012 02:02:08 -0800 (PST) Received-SPF: pass (google.com: domain of jhs@iriscouch.com designates 10.52.71.166 as permitted sender) client-ip=10.52.71.166; Authentication-Results: mr.google.com; spf=pass (google.com: domain of jhs@iriscouch.com designates 10.52.71.166 as permitted sender) smtp.mail=jhs@iriscouch.com Received: from mr.google.com ([10.52.71.166]) by 10.52.71.166 with SMTP id w6mr9388307vdu.20.1329732128183 (num_hops = 1); Mon, 20 Feb 2012 02:02:08 -0800 (PST) Received: by 10.52.71.166 with SMTP id w6mr7580301vdu.20.1329732128108; Mon, 20 Feb 2012 02:02:08 -0800 (PST) MIME-Version: 1.0 Received: by 10.220.106.130 with HTTP; Mon, 20 Feb 2012 02:01:48 -0800 (PST) From: Jason Smith Date: Mon, 20 Feb 2012 10:01:48 +0000 Message-ID: Subject: Request review of CORS rewrite To: Benoit Chesneau Cc: CouchDB Developers Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQlBXmzDByH1Ggq0d3/7+rwJYGRDfJipD1P9r03zotsEAD4P7KHD8JIKqq3mO3MkoePSeBVw X-Virus-Checked: Checked by ClamAV on apache.org Hi, Benoit and devs. I am working a little bit every day on the CORS rewrite. If you could, would you please review the code in progress? The policy implementation is 400 LOC now and nearly complete. Features: 1. A single .erl file 2. Purely functional, parameterized, (uses no couch code besides trivial ?b2l(), couch_util, etc.) 3. Given a global policy, a local policy (_security object), a method, and list of headers, it returns the CORS response headers 4. For convenience, omit the global policy and we break rule 2 and pull it from couch_config 5. The local policy is also optional, since _security objects may be milling/degenerate. In other words, the only file worth reading is this one, but the Couch CORS community appreciates if you can glance at it. Maybe we can get the ball rolling on easy stuff like style and customs while Benoit, Randall and I pound out the remainder. https://github.com/jhs/couchdb/blob/newcors/src/couchdb/couch_cors_policy.erl Oh, also, I will rewrite the Git history before proposing a patchset so pardon the mess. Thanks! -- Iris Couch