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 436109B38 for ; Tue, 21 Feb 2012 00:13:25 +0000 (UTC) Received: (qmail 80789 invoked by uid 500); 21 Feb 2012 00:13:24 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 80755 invoked by uid 500); 21 Feb 2012 00:13:24 -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 80745 invoked by uid 99); 21 Feb 2012 00:13:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 00:13:24 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bchesneau@gmail.com designates 209.85.215.52 as permitted sender) Received: from [209.85.215.52] (HELO mail-lpp01m010-f52.google.com) (209.85.215.52) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 00:13:20 +0000 Received: by lagy4 with SMTP id y4so9353558lag.11 for ; Mon, 20 Feb 2012 16:12:58 -0800 (PST) Received-SPF: pass (google.com: domain of bchesneau@gmail.com designates 10.152.102.237 as permitted sender) client-ip=10.152.102.237; Authentication-Results: mr.google.com; spf=pass (google.com: domain of bchesneau@gmail.com designates 10.152.102.237 as permitted sender) smtp.mail=bchesneau@gmail.com; dkim=pass header.i=bchesneau@gmail.com Received: from mr.google.com ([10.152.102.237]) by 10.152.102.237 with SMTP id fr13mr17414246lab.10.1329783178665 (num_hops = 1); Mon, 20 Feb 2012 16:12:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=D/d2oz2444WJ6c47wLE3LMjUOWs1b89G4b59eHbCLfc=; b=H6HajNJSHvNuUOMKBj92Hk3eyWfrAsQOrmkAyadlD0ezqM6K0d2wE5uFTzW0RISwxc xkQ04jJFDIarE236OvdfaOhAlrsQmsowMRrKeslLeGNdKgNtmhKIadSIE9IiUeGoqJ6P Qg/lRZ/1Ma8T8u/OUNev2Ri37Ouic6W2SYkek= MIME-Version: 1.0 Received: by 10.152.102.237 with SMTP id fr13mr14555412lab.10.1329783178490; Mon, 20 Feb 2012 16:12:58 -0800 (PST) Received: by 10.112.85.65 with HTTP; Mon, 20 Feb 2012 16:12:58 -0800 (PST) In-Reply-To: References: Date: Tue, 21 Feb 2012 01:12:58 +0100 Message-ID: Subject: Re: Request review of CORS rewrite From: Benoit Chesneau To: Jason Smith Cc: CouchDB Developers Content-Type: text/plain; charset=ISO-8859-1 On Mon, Feb 20, 2012 at 11:01 AM, Jason Smith wrote: > 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 Thanks jason, Sorry for the late answer, I was busy. I will have a look on it today. - benoit