You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by iilyak <gi...@git.apache.org> on 2015/04/07 17:22:58 UTC
[GitHub] couchdb-couch-mrview pull request: Use chttpd provided functions
GitHub user iilyak opened a pull request:
https://github.com/apache/couchdb-couch-mrview/pull/17
Use chttpd provided functions
couch_mrview_show's usage of couch_chttp:send_external_response
brakes CORS support. Since couch_httpd's version of send_external_response
doesn't have support for CORS compared to chttpd's version.
Other couch_http's functions are switched to corresponding chttpd's
versions as well.
COUCHDB-2656
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/iilyak/couchdb-couch-mrview 2656-use-chttpd-functions
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/couchdb-couch-mrview/pull/17.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #17
----
commit 1dc8d5252d8fbaa9df56ee63800fa616c154602e
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date: 2015-04-07T14:59:00Z
Use chttpd provided functions
couch_mrview_show's usage of couch_chttp:send_external_response
brakes CORS support. Since couch_httpd's version of send_external_response
doesn't have support for CORS compared to chttpd's version.
Other couch_http's functions are switched to corresponding chttpd's
versions as well.
COUCHDB-2656
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-couch-mrview pull request: Use chttpd provided functions
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/couchdb-couch-mrview/pull/17
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-couch-mrview pull request: Use chttpd provided functions
Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:
https://github.com/apache/couchdb-couch-mrview/pull/17#issuecomment-93576676
@iilyak I have only one thought here: make one httpd for all the couch (: Suddenly, this is epic task for a week or two may be, but definitely will solve a lot of compatibility issues between cluster/backdoor interface. I hardly can find a time for even more trivial things, not for such massive refactoring, but if you could lobby this problem and fix it - that would be awesome and helpful for the whole project.
However, all this problem as I see is about to add one more argument to each httpd_handler that defined the interface and shuffle and unite the code of chttpd and httpd. Plus think about how to start this server twice with different config sections.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-couch-mrview pull request: Use chttpd provided functions
Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:
https://github.com/apache/couchdb-couch-mrview/pull/17#issuecomment-90711559
> > Wouldn't it break now CORs for backdoor interface?
> I'll add test case for it. However I'm not sure where to put it. On one hand we have all CORs related tests in `couch/test/couchdb_cors_tests` on the other hand it would introduce one more PR.
I think we should move all the tests which are requires full server set up to the `couchdb` repository while in subprojects repos maintain only the tests which are tests related project modules without interactions with the other projects. In other simpler words: `couchdb` for integrational/functional tests, `couchdb-X` - for unit tests.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-couch-mrview pull request: Use chttpd provided functions
Posted by iilyak <gi...@git.apache.org>.
Github user iilyak commented on the pull request:
https://github.com/apache/couchdb-couch-mrview/pull/17#issuecomment-93573484
@kxepal: You are right this change would brake backdoor interface.
[Here](https://github.com/apache/couchdb-couch-mrview/blob/master/src/couch_mrview_show.erl#L77) we need to call `chttpd_external` version of the `json_req_obj` for clustered and `couch_httpd_external` one for backdoor. The difference between the two versions is in set of properties returned and in `couch_db:get_db_info -> fabric:get_db_info` However I really don't like introducing the knowledge about type of a call to couch_mrview_show. I'm looking for alternative approaches.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-couch-mrview pull request: Use chttpd provided functions
Posted by iilyak <gi...@git.apache.org>.
Github user iilyak commented on the pull request:
https://github.com/apache/couchdb-couch-mrview/pull/17#issuecomment-90709693
> Wouldn't it break now CORs for backdoor interface?
I'll add test case for it. However I'm not sure where to put it. On one hand we have all CORs related tests in `couch/test/couchdb_cors_tests` on the other hand it would introduce one more PR.
> Also, wouldn't CORs implemented for chttpd solve this problem apache/couchdb-chttpd#8
apache/couchdb-chttpd#8 wouldn't solve the problem with couch_mrview_show. The changes in apache/couchdb-chttpd#8 are compatible with this PR though.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-couch-mrview pull request: Use chttpd provided functions
Posted by iilyak <gi...@git.apache.org>.
Github user iilyak commented on the pull request:
https://github.com/apache/couchdb-couch-mrview/pull/17#issuecomment-93760517
The problem is fixed by [following commit](https://github.com/iilyak/couchdb-chttpd/commit/0b5e15e0ff9cd5ec13f5a332b0c3f1f2951ccfac)
Test case is added in [PR](https://github.com/apache/couchdb-couch/pull/43)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-couch-mrview pull request: Use chttpd provided functions
Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:
https://github.com/apache/couchdb-couch-mrview/pull/17#issuecomment-90705706
Wouldn't it break now CORs for backdoor interface? Also, wouldn't CORs implemented for chttpd solve this problem https://github.com/apache/couchdb-chttpd/pull/8 ?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---