[
https://issues.apache.org/jira/browse/COUCHDB-1416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13214371#comment-13214371
]
Jason Smith commented on COUCHDB-1416:
--------------------------------------
Thanks, Ryan.
Hopefully this is a dupe of COUCHDB-981. Caolan?
Firstly, yours would be the first test in the entire JavaScript suite to use
vhosts. I do not know if vhosts were avoided all this time by design or
accident. I made a small change to your hostname guesser (window.location.host)
and it works for me.
Next, this bugfix has a problem. CouchDB has an object, httpd{} which contains
a Mochiweb object. Mochiweb is an upstream dependency. I thought this fix would
happen by adding a a #httpd.requested_path however all the vhost/rewrite code
works exclusively with mochiweb.
So the question is how to remember state through all possible processing of a
MochiReq.
> the requested_path that is passed to a show is wrong on a vhost with a path
> ----------------------------------------------------------------------------
>
> Key: COUCHDB-1416
> URL: https://issues.apache.org/jira/browse/COUCHDB-1416
> Project: CouchDB
> Issue Type: Bug
> Components: HTTP Interface
> Affects Versions: 1.2
> Reporter: Ryan Ramage
> Priority: Minor
>
> 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:
> https://github.com/ryanramage/couchdb/commit/e9417480e2ce160f359d9508dcec3d4e56045a60
> 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:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira