couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Smith <>
Subject Re: [9/9] git commit: Testing requested_path for various combinations of rewrites and vhost
Date Thu, 01 Mar 2012 00:38:34 GMT
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.

View raw message