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 4977C9B2F for ; Thu, 1 Mar 2012 00:39:23 +0000 (UTC) Received: (qmail 11242 invoked by uid 500); 1 Mar 2012 00:39:22 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 11206 invoked by uid 500); 1 Mar 2012 00:39:22 -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 11198 invoked by uid 99); 1 Mar 2012 00:39:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2012 00:39:22 +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 (athena.apache.org: local policy) Received: from [209.85.212.52] (HELO mail-vw0-f52.google.com) (209.85.212.52) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2012 00:39:16 +0000 Received: by vbih1 with SMTP id h1so44225vbi.11 for ; Wed, 29 Feb 2012 16:38:55 -0800 (PST) Received-SPF: pass (google.com: domain of jhs@iriscouch.com designates 10.52.26.8 as permitted sender) client-ip=10.52.26.8; Authentication-Results: mr.google.com; spf=pass (google.com: domain of jhs@iriscouch.com designates 10.52.26.8 as permitted sender) smtp.mail=jhs@iriscouch.com Received: from mr.google.com ([10.52.26.8]) by 10.52.26.8 with SMTP id h8mr3787598vdg.122.1330562335327 (num_hops = 1); Wed, 29 Feb 2012 16:38:55 -0800 (PST) Received: by 10.52.26.8 with SMTP id h8mr3246882vdg.122.1330562335205; Wed, 29 Feb 2012 16:38:55 -0800 (PST) MIME-Version: 1.0 Sender: jhs@iriscouch.com Received: by 10.220.106.130 with HTTP; Wed, 29 Feb 2012 16:38:34 -0800 (PST) In-Reply-To: References: <20120229110959.0AE614CF87@tyr.zones.apache.org> From: Jason Smith Date: Thu, 1 Mar 2012 07:38:34 +0700 X-Google-Sender-Auth: pWdYoFCeomSTIzs9NU5KEdNhdt4 Message-ID: Subject: Re: [9/9] git commit: Testing requested_path for various combinations of rewrites and vhost To: dev@couchdb.apache.org Cc: Ryan Ramage Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQnyY2VK9pUIwSlGEDgwHC9cOdrL814qBjpzZ+IO5Ez6qamtdFwESWVKaJ5R/20ciYU1xtMq X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Mar 1, 2012 at 3:17 AM, Randall Leeds wrote: > I made a change to requested_path recently on master and 1.2 but > didn't get much feedback about it. > It seemed like it was obviously broken to me but maybe I misunderstood > the intention. > Is it working the way you expect? > > Relevant commit: 879a1bc19b145e126b9386aed2023f9cd1df8b31 The JIRA ticket indicates a bug when "hostname/path" was used as a vhost. Ryan showed that the "/path" part is forgotten by the time req.requested_path arrives in a _show function. Jan said it's not a bug because paths in vhost keys are invalid. Or at least, they *oughtn't* be valid. I thought the bug occurred even with normal vhosts (no path) but several unit tests later, I realized that is false. The only bug is when vhosts include a path component. And so the *real* bug will probably be that CouchDB should reject non well-formed vhost keys. The only remaining question is whether Ryan used that feature because there was no possible alternative.