couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Lehnardt (Commented) (JIRA)" <>
Subject [jira] [Commented] (COUCHDB-1416) the requested_path that is passed to a show is wrong on a vhost with a path
Date Wed, 29 Feb 2012 10:13:58 GMT


Jan Lehnardt commented on COUCHDB-1416:

I'm sorry, but the solution here is to make couchdb give you an error if you try to set up
a vhost telling you that it should just be

I'm happy to look at alternatives to solve the problem of putting multiple couchapps into
one vhost, but this is not it.

In response to @Jason:

> 1. Your description is counter to the actual CouchDB code. Paths are valid vhost keys. and are distinct vhosts in 1.2.x. 

That is CouchDB expecting an RC2616 Host header (which can't include a path). If anything,
this is a bug, not a feature. The fact that this works is an accident if anything.

> 2. In any case, the bug in this ticket is that the path a browser sends to couch is somehow
forgotten by the time it hits a _show function as req.requested_path. Ryan might fill in the
details but AFAIK, this will fail. 

This looks like a more of a genuine issue, but I haven't been able to look at the patches.

> the requested_path that is passed to a show is wrong on a vhost with a path 
> ----------------------------------------------------------------------------
>                 Key: COUCHDB-1416
>                 URL:
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    Affects Versions: 1.2
>            Reporter: Ryan Ramage
>            Priority: Minor
>         Attachments: A_0001-Testing-requested_path-for-various-combinations-of-r.patch,
A_0002-Compatibility-with-the-CLI-test-runner.patch, A_0003-Store-the-entire-requested-path-in-x-couchdb-vhost-f.patch,
> In a show or list, it is impossible to construct a full url that an end user could use
to re-request the resource, given the various combinations of vhosts and rewrites. 
> The major one is if the vhost contains a path component, this path information is not
passed to the show at all. 
> I have created three tests that highlight the condition, currently failing for one test,
with the two passing to prevent regressions.
> The commit can be found here:
> I have talked this over with JasonSmith and bennoitc on #couchdb and they asked me to
write the tests and raise the jira. 

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message