summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Implement _security as a _local docnew-security-objectPaul Joseph Davis2012-01-253-34/+65
| | | | | | | | | | | | | | As per mailing list discussion on enabling the syncing of _security objects this builds upon the previous commits to enable the agreed upon strategy of giving a revision tree to the _security object. The old API is maintained with identical in the normal single node case. Though it is also now possible to update the _local/_security doc directly using the normal HTTP document and _bulk_docs API's to edit the doc directly. This document is special cased like _design docs to disallow non-admins from editing it.
* Prevent multiple updates to a single _local docPaul Joseph Davis2012-01-251-0/+10
| | | | | | | | | | | If a user uploads a two _local docs with the same docid in a _bulk_docs request the updater will insert multiple entries into the local docs btree. This patch avoids that by throwing an error if a user attempts it. This is an old bug that I caught and just added a fix for. I split it out as its own patch to point out that its a bug fix that differs from the old behvior.
* Update _local docs to use revision treesPaul Joseph Davis2012-01-253-65/+81
| | | | | | | | | | | | | | | There are a number of cases that _local docs might need to be merged between nodes. One motivating case is for clusters that might wish to move _local docs across nodes to maintain replication checkpoints with external CouchDB instances. The previous _local docs strategy of a single linear sequence breaks down in this situation. This new behavior should be indistinguishable from the previous behavior assuming clients did not try and introspect the _rev value for _local documents. It should be impossible for normal HTTP clients to introduce different behavior than previously existed because there's no support for non-linear updates at the HTTP level. This update is merely and internal refactoring for special cases like clusters.
* Refactor revision mergingPaul Joseph Davis2012-01-254-228/+264
| | | | | | | | | | | | | | | | | | | | | | | | * Refactor couch_key_tree:merge/3 and helper functions * Rewrite couch_key_tree tests for new merge/3 functionality * Remove merging logic from couch_db_udpater:merge_rev_trees/6 * Introduce couch_doc:merge/3 to handling revision merging This patch does not change any outwardly visible behavior of CouchDB. The old revision merging code was split across a couple functions with important merging logic mixed into couch_db_udpater:merge_rev_trees/6. This is important because couch_db_updater:merge_rev_trees/6 is also the same code responsible for handling update_seq updates. This patch factors out the revision merging and conflict detection into couch_doc:merge/3 with the left over update_seq logic remaining in couch_db_udpater:merge_rev_trees/6. This approach is being taken so that we can reuse the revision merging for other parts of CouchDB, notably the _local docs btree.
* remove obsolete entry in .gitignoreRandall Leeds2012-01-241-1/+0
|
* Update NEWS and CHANGESRandall Leeds2012-01-232-0/+7
|
* Fixing COUCHDB-1383: update the in memory state of the view on save.Sam Bisbee2012-01-231-0/+1
|
* fix COUCHDB-1369.benoitc2012-01-231-1/+2
| | | | Don't restart https if we start httpd and vice-versa.
* Small tweaks to test 242-replication-many-leaves.tFilipe David Borba Manana2012-01-231-2/+4
| | | | These tweaks make the test pass on slower machines/environments.
* Use the correct utility function to get the index directory pathJason Smith (air)2012-01-221-1/+1
|
* fix show/list/external requested_path for rewritesRandall Leeds2012-01-221-1/+5
| | | | | | | | | | | | | | Since we're using the x-couchdb-requested-path header to track the requested path we should expose it in the request object we pass to the view server. Currently this object has a `requested_path` key which has the pre-vhost path. However, when there is no virtual host it will have the post-rewrite path. With this change it always presents the path which was requested by the client, whether or not virtual hosts were matched. This should make the lives of app authors easier by giving them a reliable source for constructing relative paths and redirects that works with and without virtual hosts.
* Fix SpiderMonkey header detectionPaul Joseph Davis2012-01-221-4/+5
| | | | | | My last commit broke because the header detection wasn't using the JS_CPPFLAGS that includes the search paths. Fix is simply to move that variable assignment to before the header check.
* Remove dead _all_docs codeRobert Newson2012-01-221-143/+0
|
* replaced --default-key with GPG_ARGS env variableNoah Slater2012-01-211-1/+1
|
* updated INSTALL.Unix instructions for homebrew on Mac OS XNoah Slater2012-01-211-0/+8
|
* Fix SpiderMonkey version detectionPaul Joseph Davis2012-01-211-19/+22
| | | | | | | | | Randall's last patch to only test for JSOPTION_ANONFUNFIX ended up reordering the test before the headers were located. This ran into errors in version detection. This patch reorders the header location as well as adds a few more default search paths when no --with-js-include option is specified to account for newer SpiderMonkeys that puth their headers into $PREFIX/include/js.
* Allow persistent cookiesRobert Newson2012-01-204-1/+16
| | | | COUCHDB-1304
* Fixes for COUCHDB-188 fixFilipe David Borba Manana2012-01-171-2/+2
| | | | | On conflict, keep using the current revision tree. Issue noticed by Paul Davis. Thanks.
* Fix ets lookup case_clause error after ddoc is updatedFilipe David Borba Manana2012-01-171-5/+4
| | | | | | | | | | This happens if the ddoc_updated event is received after a client opens the new view group or if a design document is updated several times in a row and there are still clients streaming views from 2 or more view groups that match old versions of the design document. This relates to COUCHDB-1309
* COUCHDB-1380 Revert "Better logger performance"Robert Newson2012-01-172-34/+23
| | | | | | | This reverts commit 9f2398faef3936a844caffbaf3eef8675383ccfd which switched couch_log to use disk_log. Unfortunately that module performs positioned writes which prevents the usual logrotation strategy from working correctly.
* Move myself from THANKS to AUTHORS with new spiffy @apache.org emailDave Cottlehuber2012-01-122-1/+2
|
* fix couch_httpd:host_for_request/1 for sslRandall Leeds2012-01-081-1/+4
|
* Allow test/javascript/run to be run standaloneBob Dionne2012-01-081-1/+2
| | | | | | | Some users will incrementally reload a single code module into a running couchdb instance and wish to run the js tests again. This allows test/javascript/run to execute outside of make check by using an env variable COUCHDB_NO_START.
* Use enif_is_number on OTP R15B or higherFilipe David Borba Manana2012-01-081-10/+11
| | | | The NIF API in OTP R15B introduced the enif_is_number function.
* implement couch_readfile in couchjs utilsRandall Leeds2012-01-072-2/+13
|
* avoid unneccesary calls to strlenRandall Leeds2012-01-071-9/+9
|
* improve the startup delay for js test harnessRandall Leeds2012-01-072-1/+4
| | | | | | | Change waitForSuccess to catch errors in the sync request that's used to hand control back to the JS engine. Then, use waitForSuccess to see if CouchDB has started and remove the 1 second sleep before the tests start.
* COUCHDB-1339 - stop couchdb on js cli exitsRandall Leeds2012-01-071-2/+12
|
* Don't send Content-Type in GET/HEAD requestsFilipe David Borba Manana2012-01-072-4/+7
| | | | | | This partially reverts 55d2c9e390cf06a76ff6715a60b85f8f4ca26f97, adding only a Content-Type of application/json to post requests against _revs_diff.
* Set COUCHDB_NO_START=1 to not start CouchDB during JavaScript testsJan Lehnardt2012-01-071-4/+8
| | | | This restores the previous default behaviour.
* Break out JavaScript test suite into separate make target `check-js`.Jan Lehnardt2012-01-071-1/+3
|
* Cache-bust every attachment range GETRobert Newson2012-01-071-13/+17
| | | | | | | | | | | | | | | | | | This appears to expose a bug in Chrome for an edge case. There's a test that sends "Range: bytes=0-29" for an item that is one byte shorter than the requested range. Curl, Firefox and Safari correctly returns; Content-Range: bytes 0-28/29 Content-Length: 29 Whereas Safari erroneously gets this; Content-Range: bytes 0-29/29 Content-Length: 30 So, this test will fail on Chrome until a) Chrome is fixed or b) someone points out that I'm wrong about the Chrome bug.
* Add a cache buster for Chrome to attachment_ranges testJan Lehnardt2012-01-071-1/+2
|
* Use default content-type application/jsonFilipe David Borba Manana2012-01-072-5/+3
| | | | | | Some requests made by the replicator were missing a Content-Type header. By default now all requests have a Content-Type of application/json.
* Add heartbeat parameter to all _changes requestsFilipe David Borba Manana2012-01-071-2/+4
| | | | | Even non-continuous _changes requests, particularly filtered ones, can cause long periods of inactivity.
* Update CHANGES & NEWS to reflect COUCHDB-188Filipe David Borba Manana2012-01-072-0/+7
|
* Fix document deletion followed by creationFilipe David Borba Manana2012-01-072-12/+72
| | | | | | | | | | If the updater collects 2 updates for the same document where the first deletes it and the second creates it, it would send a conflict error to the client of the create request. This wouldn't happen if the 2 requests were collected in 2 different batches by the updater. Closes COUCHDB-188
* Fix check of conflicts for replication testsFilipe David Borba Manana2012-01-072-8/+10
| | | | | | The conflicts option belongs to couch_db:open_doc/3 and not to couch_doc:to_json_obj/2. Also added the deleted_conflicts option.
* COUCHDB-1152 remove icu version dependency (win)Randall Leeds2012-01-061-5/+5
| | | | Patch by Dave Cottlehuber.
* don't ln the couchjs install target on windowsRandall Leeds2012-01-061-0/+2
| | | | | | | On windows we install binaries directly into $(prefix)/bin rather than a local bin directory hidden away in the erlang module. Therefore, when building this way, don't try to create a symbolic link into the final location since the final location has the output binary already.
* Revert "Add ICU_CPPFLAGS to ICU_C|_CXXFLAGS"Randall Leeds2012-01-061-4/+0
| | | | | | | As of 32fb9f8e0416910a2431227b5fbdeef93ccd94bc this should no longer be necessary. This reverts commit 2d90a1249dea1d02d46266d52a0d269f0a33dbb0.
* COUCHDB-1042 - restore libcurl as soft dependencyRandall Leeds2012-01-061-0/+2
|
* Happy New YearJan Lehnardt2012-01-061-1/+1
|
* Remove console.log() statements from testFilipe David Borba Manana2012-01-051-4/+0
|
* Update CHANGES & NEWS to reflect COUCHDB-1238Filipe David Borba Manana2012-01-042-0/+6
|
* Allow OAuth credentials to be stored in user documentsFilipe David Borba Manana2012-01-047-89/+491
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the ini configuration parameter `use_users_db` (section `couch_httpd_oauth`) is set to true, OAuth credentials can be stored in user documents (system database _users) instead. The credentials are stored in a top level propery of user documents named `oauth`. Example: { "_id": "org.couchdb.user:joe", "type": "user", "name": "joe", "password_sha": "fe95df1ca59a9b567bdca5cbaf8412abd6e06121", "salt": "4e170ffeb6f34daecfd814dfb4001a73" "roles": ["foo", "bar"], "oauth": { "consumer_keys": { "consumerKey1": "key1Secret", "consumerKey2": "key2Secret" }, "tokens": { "token1": "token1Secret", "token2": "token2Secret" } } } Closes COUCHDB-1238.
* Improve test 05-replication-many-leaves.tFilipe David Borba Manana2012-01-041-36/+112
| | | | | | | The test now includes attachments to verify that the incremental attachment replication code path succeeds when there are many leaf revisions of a document with attachments.
* Use ICU_CPPFLAGS instead of _CFLAGSRandall Leeds2012-01-033-9/+6
| | | | | | | | | | This removes the need for c4f6ff9c6cf5512546d5799f05dd445a4da979b3 which was made in response to -ansi coming from icu-config on my system. Instead, it's more sensible to use the preprocessor flags from icu-config which provides the -I header locations and -D definitions but doesn't add a bunch of excessive warning flags or ansi conformance. This reverts commit c4f6ff9c6cf5512546d5799f05dd445a4da979b3.
* Fix admin users creation and user password change in futon.benoitc2012-01-035-47/+31
| | | | main patch from jan, reviewed & updated by me.
* Update etap tests for System Database SecurityJan Lehnardt2012-01-033-3/+9
|