You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by Jason Smith <jh...@apache.org> on 2012/03/01 01:38:34 UTC

Re: [9/9] git commit: Testing requested_path for various combinations of rewrites and vhost

On Thu, Mar 1, 2012 at 3:17 AM, Randall Leeds <ra...@gmail.com> 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.