Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 5880 invoked from network); 27 Jan 2011 19:05:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Jan 2011 19:05:33 -0000 Received: (qmail 18400 invoked by uid 500); 27 Jan 2011 19:05:31 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 18354 invoked by uid 500); 27 Jan 2011 19:05:30 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 18346 invoked by uid 99); 27 Jan 2011 19:05:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Jan 2011 19:05:30 +0000 X-ASF-Spam-Status: No, hits=2.9 required=5.0 tests=FREEMAIL_FROM,FS_REPLICA,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of paul.joseph.davis@gmail.com designates 209.85.213.180 as permitted sender) Received: from [209.85.213.180] (HELO mail-yx0-f180.google.com) (209.85.213.180) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Jan 2011 19:05:23 +0000 Received: by yxd30 with SMTP id 30so770044yxd.11 for ; Thu, 27 Jan 2011 11:05:02 -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=zdnaA98dz4WiT3ya+wDp2vpAZSYMW5W7j8nW4pMJh38=; b=YpHeIm9dDUUMDqfJv9zOSuNxjAzrJNPPk74+EQlI9A4cNFXQSWHRQsi1xrQulaqbkG Ras47mvqaWThM0pykLSVbvEvC4lTmSmAeVsgjQUGLBGmXzg3BJaezAwdfwGAYjnA6iDS iZqT/86o+bc6sXdowPHh9U0Gs0oFGleA1nDNc= 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=Sn+pGLyOmwJrPA4lm2xyr27PLDzdDGzfgnXXgLJJp57qt1KMJv0drijuU3mOkqrlNY xCJkAi0X3ADshSUrsSVtIqY6JR/zXj72lWHZqKYDfL6koRYwsKU4t+tC3XljrvqDTiJQ 23Gy/1Wf40xWnRIU0N99zNoM1xFNwYgrYRbL8= Received: by 10.150.206.17 with SMTP id d17mr3244725ybg.299.1296155102166; Thu, 27 Jan 2011 11:05:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.147.34.2 with HTTP; Thu, 27 Jan 2011 11:04:21 -0800 (PST) In-Reply-To: References: From: Paul Davis Date: Thu, 27 Jan 2011 14:04:21 -0500 Message-ID: Subject: Re: dbcopy - A faster alternative to replication To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Jan 27, 2011 at 1:02 PM, Chris Stockton wrote: > I looked through the code, and noticed: > > A bit of code from [1]: > > =A0 =A0 =A0 =A0handle_external_req(#httpd{ > 29 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0path_parts= =3D[_DbName, _External, UrlName | _Path] > 30 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}=3DHttpReq, Db) -> > 31 =A0 =A0 =A0 =A0 =A0process_external_req(HttpReq, Db, UrlName); > 32 =A0 =A0 =A0handle_external_req(#httpd{path_parts=3D[_, _]}=3DReq, _Db)= -> > 33 =A0 =A0 =A0 =A0 =A0send_error(Req, 404, <<"external_server_error">>, <= <"No server > name specified.">>); > 34 =A0 =A0 =A0handle_external_req(Req, _) -> > 35 =A0 =A0 =A0 =A0 =A0send_error(Req, 404, <<"external_server_error">>, <= <"Broken > assumption">>). > > From what I have seen of erlang, this means if no DBName exists, then > it will not work. Maybe we could add a optional path without a dbname > so people could make global external handlers or would more code be > required? > > [1] http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd_ex= ternal.erl?view=3Dmarkup > This bit of code will be going away in a version or two. You'll want to look at the http proxy for handling arbitrary requests now (which will be in 1.1.0)