Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 30608 invoked from network); 2 Feb 2011 19:38:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Feb 2011 19:38:26 -0000 Received: (qmail 23748 invoked by uid 500); 2 Feb 2011 19:38:25 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 23583 invoked by uid 500); 2 Feb 2011 19:38:25 -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 23575 invoked by uid 99); 2 Feb 2011 19:38:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 19:38:25 +0000 X-ASF-Spam-Status: No, hits=1.8 required=5.0 tests=FREEMAIL_FROM,FREEMAIL_REPLY,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of paul.joseph.davis@gmail.com designates 74.125.83.52 as permitted sender) Received: from [74.125.83.52] (HELO mail-gw0-f52.google.com) (74.125.83.52) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 19:38:18 +0000 Received: by gwb11 with SMTP id 11so158956gwb.11 for ; Wed, 02 Feb 2011 11:37:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=thgkWZdbnHZCQnhVp62mdsDvNQ42dGJJaoHq+U3Ljj4=; b=iTPQu7xFCx0TprZaIl1eMn9F1LLwouA4rdNfyypgxPStm9o7rFuj8dUSPvWaTIvmzN uo0fX6a2zQDrtlkqfnF+1EYh+tTx4OGmkX0zzyEFDLsveTBBR6QLc4wqJl9al1KGsXzR VPo/O3C7aw1QiIY+kKBVvir+hs0lvVnMet7GA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=fGXoNih1iyexXyQQPOO2cTtnxcjMv2rQOMLKxDrf0uGbZdshuqX+sNWMiCCha3repf 6jzGewnp8gZFE0253pA+ng06ahg4EZOQd/eqU3e3iaI7tw/PCrOabKLYEuuHTZTnaxZI hVCefLYQ7NwlreBUjM6PBiTM5cSW5l7hIBWLs= Received: by 10.151.42.9 with SMTP id u9mr11886988ybj.245.1296675475369; Wed, 02 Feb 2011 11:37:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.147.182.8 with HTTP; Wed, 2 Feb 2011 11:37:15 -0800 (PST) In-Reply-To: References: <20110202102644.2A3062388A3C@eris.apache.org> From: Paul Davis Date: Wed, 2 Feb 2011 14:37:15 -0500 Message-ID: Subject: Re: svn commit: r1066404 - /couchdb/branches/1.1.x/src/couchdb/couch_httpd_auth.erl To: dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable when is_list_of_lists? On Wed, Feb 2, 2011 at 2:36 PM, Robert Newson wro= te: > Ack, thanks. will fix (again) > > On Wed, Feb 2, 2011 at 7:17 PM, Filipe David Manana = wrote: >> Robert, >> >>> - =A0 =A0 =A0 =A0[User | Pass] -> >>> + =A0 =A0 =A0 =A0[User | Pass] when is_list(Pass) -> >>> =A0 =A0 =A0 =A0 =A0 =A0 {User, string:join(Pass, ":")}; >>> =A0 =A0 =A0 =A0 [User] -> >>> =A0 =A0 =A0 =A0 =A0 =A0 {User, ""}; >> >> "Pass" will always be a list. The clause with a single element match >> is the redundant one. Calling string:join(":") on an emply list/string >> will return an empty list/string, so the [User] clause could go away. >> >> cheers >> >> On Wed, Feb 2, 2011 at 2:26 AM, =A0 wrote: >>> Author: rnewson >>> Date: Wed Feb =A02 10:26:43 2011 >>> New Revision: 1066404 >>> >>> URL: http://svn.apache.org/viewvc?rev=3D1066404&view=3Drev >>> Log: >>> fix clause warning introduced with COUCHDB-969 >>> >>> Modified: >>> =A0 =A0couchdb/branches/1.1.x/src/couchdb/couch_httpd_auth.erl >>> >>> Modified: couchdb/branches/1.1.x/src/couchdb/couch_httpd_auth.erl >>> URL: http://svn.apache.org/viewvc/couchdb/branches/1.1.x/src/couchdb/co= uch_httpd_auth.erl?rev=3D1066404&r1=3D1066403&r2=3D1066404&view=3Ddiff >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>> --- couchdb/branches/1.1.x/src/couchdb/couch_httpd_auth.erl (original) >>> +++ couchdb/branches/1.1.x/src/couchdb/couch_httpd_auth.erl Wed Feb =A0= 2 10:26:43 2011 >>> @@ -53,7 +53,7 @@ basic_name_pw(Req) -> >>> =A0 =A0 =A0 =A0 =A0 =A0 nil; >>> =A0 =A0 =A0 =A0 [User, Pass] -> >>> =A0 =A0 =A0 =A0 =A0 =A0 {User, Pass}; >>> - =A0 =A0 =A0 =A0[User | Pass] -> >>> + =A0 =A0 =A0 =A0[User | Pass] when is_list(Pass) -> >>> =A0 =A0 =A0 =A0 =A0 =A0 {User, string:join(Pass, ":")}; >>> =A0 =A0 =A0 =A0 [User] -> >>> =A0 =A0 =A0 =A0 =A0 =A0 {User, ""}; >>> >>> >>> >> >> >> >> -- >> Filipe David Manana, >> fdmanana@gmail.com, fdmanana@apache.org >> >> "Reasonable men adapt themselves to the world. >> =A0Unreasonable men adapt the world to themselves. >> =A0That's why all progress depends on unreasonable men." >> >