summaryrefslogtreecommitdiff
path: root/share
AgeCommit message (Collapse)Author
2009-08-11Initial commit of _update handler. Thanks to Paul Davis, Jason Davies for ↵John Christopher Anderson
code and others for discussion. The _update handler accepts POSTs to paths like: /db/_design/foo/_update/bar and PUTs which include docids, like: /db/_design/foo/_update/bar/docid The function signature: function(doc, req) { doc.a_new_field = req.query.something; return [doc, "<h1>added something to your doc</h1>"]; } The tests in update_documents.js are fairly complete and include examples of bumping a counter, changing only a single field, parsing from (and returning) XML, and creating new documents. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@803245 13f79535-47bb-0310-9956-ffa450edef68
2009-08-06batch_save test wasn't being installedAdam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@801649 13f79535-47bb-0310-9956-ffa450edef68
2009-08-05proper handling of 406 Not Acceptable errors in list and show functionsJohn Christopher Anderson
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@801345 13f79535-47bb-0310-9956-ffa450edef68
2009-08-05Upgraded JavaScript Accept header handling to make it useful.John Christopher Anderson
After user@ thread with Adam Jacob [1] http://tinyurl.com/kuhl2j I realized that giving users the option to set a server preference of mime-types was crucial. Without ordering, you see nasty side effects like a browser getting an Atom feed by default. With ordering, you can ensure that browsers get HTML, API clients see XML, and Ajax apps use JSON in a no-hassle way. Example new API: function(doc, req) { provides("html", function() { return "Hello " + doc.name + "."; }); provides("xml", function() { var xml = new XML('<xml></xml>'); xml.hello = doc.name; return xml; } }; If a client sends an Accept header like "application/xml, text/html" this will return html. If the client sends just "application/xml" they will get xml. respondsWith() has been removed. I don't think it's worth the cost to maintain a parallel implementation just to be deprecated as buggy. This patch also continues us on the path to a cleaner, more organized query server. Cheers and enjoy. [1] http://mail-archives.apache.org/mod_mbox/couchdb-user/200907.mbox/%3cb8602b350907241906l7c7f97fdg9d78facacd8605fd@mail.gmail.com%3e git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@801056 13f79535-47bb-0310-9956-ffa450edef68
2009-08-04Move mimeparse.js to it's own file, add to NOTICE as an external library.John Christopher Anderson
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@801018 13f79535-47bb-0310-9956-ffa450edef68
2009-08-04Initial check-in of OAuth and cookie authentication.Damien F. Katz
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@800938 13f79535-47bb-0310-9956-ffa450edef68
2009-08-04encode slashes in db names in Location response header after database ↵Jan Lehnardt
creation, move couch_rep:url_encode/1 to couch_util:url_encode/1, closes COUCHDB-411 git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@800883 13f79535-47bb-0310-9956-ffa450edef68
2009-08-04add compile-time conditionals to support the upcoming Spidermonkey 1.8, swap ↵Jan Lehnardt
searching for libjs and libmozjs, patch by Alessandro Decina, closes COUCHDB-288 git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@800750 13f79535-47bb-0310-9956-ffa450edef68
2009-08-01implement longpolling for _changes, unify _changes-mode parameters, patch by ↵Jan Lehnardt
Benoit Chesneau, closes COUCHDB-241 git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@799862 13f79535-47bb-0310-9956-ffa450edef68
2009-08-01enable include_docs=true for list functions, patch by Mark Hammond, closes ↵Jan Lehnardt
COUCHDB-444 git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@799835 13f79535-47bb-0310-9956-ffa450edef68
2009-07-29Fix for COUCHDB-434. Only reassign previous revid inside the updater process.Damien F. Katz
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@799093 13f79535-47bb-0310-9956-ffa450edef68
2009-07-24speed up json encoding, patch by Brian Candler, closes COUCHDB-399Jan Lehnardt
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@797548 13f79535-47bb-0310-9956-ffa450edef68
2009-07-23Apply patch by Volker Mische to improve the sidebar toggle animation. Really ↵Christopher Lenz
closes COUCHDB-425 now. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@797252 13f79535-47bb-0310-9956-ffa450edef68
2009-07-23Allow the Futon sidebar to be moved out of the way. Based on idea and patch ↵Christopher Lenz
by Volker Mische. Closes COUCHDB-425. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@797024 13f79535-47bb-0310-9956-ffa450edef68
2009-07-22Fix automatic group=true on reduce views in Futon, which was only getting ↵Christopher Lenz
applied erratically depending on timing. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@796898 13f79535-47bb-0310-9956-ffa450edef68
2009-07-22Fix off-by-one error in Futon view paging. Thanks to Jason Davies for the ↵Christopher Lenz
patch. Closes COUCHDB-428. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@796895 13f79535-47bb-0310-9956-ffa450edef68
2009-07-22Ignore whitespace in reduce code textarea in Futon. Closes COUCHDB-328.Christopher Lenz
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@796888 13f79535-47bb-0310-9956-ffa450edef68
2009-07-22Apply patch by Jason Davies that improves how the view menu is populated: ↵Christopher Lenz
only one HTTP request (thanks to `include_docs`), and design docs and view names are sorted alphabetically. Closes COUCHDB-426. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@796885 13f79535-47bb-0310-9956-ffa450edef68
2009-07-22Avoid usage of `Array.indexOf` function, which is not available on IE (and ↵Christopher Lenz
not yet part of any final ECMAScript standard). git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@796658 13f79535-47bb-0310-9956-ffa450edef68
2009-07-22Change document creation in Futon so that it no longer prompts for a ↵Christopher Lenz
document ID, but simply opens the document page for an empty (and unsaved) document, and allows you to modify the ID. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@796635 13f79535-47bb-0310-9956-ffa450edef68
2009-07-21Fix for COUCHDB-318: when adding or renaming a field in Futon, check that a ↵Christopher Lenz
field with the same name does not already exist. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@796548 13f79535-47bb-0310-9956-ffa450edef68
2009-07-21Minor cosmetic cleanup for the custom test page: highight active navitem in ↵Christopher Lenz
sidebar, no toggle icon, resizable text area. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@796544 13f79535-47bb-0310-9956-ffa450edef68
2009-07-21Fix for compatibility of Futon with design documents that have slashes in ↵Christopher Lenz
the document ID or a view name. Closes COUCHDB-408 (again). git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@796541 13f79535-47bb-0310-9956-ffa450edef68
2009-07-21Put the database name in the Futon sidebar in the link title, so it is still ↵Christopher Lenz
available in its entirety as a tooltip, even when the link text is cut off. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@796537 13f79535-47bb-0310-9956-ffa450edef68
2009-07-21Make the view-selection and jump-to-document widgets at the top of the Futon ↵Christopher Lenz
database page a bit more compact. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@796535 13f79535-47bb-0310-9956-ffa450edef68
2009-07-21Avoid wrapping of long database names in the Futon sidebar.Christopher Lenz
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@796269 13f79535-47bb-0310-9956-ffa450edef68
2009-07-21One line patch to fix _local docs.Paul Joseph Davis
Accounts for _local docs not having conflict resolution in Futon. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@796246 13f79535-47bb-0310-9956-ffa450edef68
2009-07-21fix view selection in Futon for Opera, patch by Alexander Uvarov, closes ↵Jan Lehnardt
COUCHDB-369 git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@796234 13f79535-47bb-0310-9956-ffa450edef68
2009-07-21refactor jquery.couch.js, gets rid of a lot of duplicate code, patch by Yoan ↵Jan Lehnardt
Blanc, closes COUCHDB-368 git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@796228 13f79535-47bb-0310-9956-ffa450edef68
2009-07-21Close jsonp response for _changes requests. Patch by Benoit Chesneau. Closes ↵Jan Lehnardt
COUCHDB-418. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@796207 13f79535-47bb-0310-9956-ffa450edef68
2009-07-20Make the view URL in Futon consistent with the URL for views in the HTTP ↵Christopher Lenz
interface (and thereby also avoid a redirect). Thanks to Volker Mische for the suggestion and patch. Closes COUCHDB-408. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@796027 13f79535-47bb-0310-9956-ffa450edef68
2009-07-20Initial checkin of _changes filters. The prime weak-spot for this approach ↵John Christopher Anderson
is that it maintains an OS-process per connected filtered _changes consumer. I'm pretty sure we'll be able to work around this without changing the API, but it'll involve a lot of OS-process bookkeeping. Those enhancements should generally improve show & list performance as well. Punting on them for now, first wanted to get _changes filters implemented so people could give feedback. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@795687 13f79535-47bb-0310-9956-ffa450edef68
2009-07-17Deterministic revids, MD5 checking of documents, added tracking of rev when ↵Damien F. Katz
an attachment is edited to allow attachment level replication. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@795232 13f79535-47bb-0310-9956-ffa450edef68
2009-07-16added missing fileNoah Slater
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@794828 13f79535-47bb-0310-9956-ffa450edef68
2009-07-14wheeeeeeeeNoah Slater
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@794057 13f79535-47bb-0310-9956-ffa450edef68
2009-07-14added licence check, and licence.skipNoah Slater
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@794030 13f79535-47bb-0310-9956-ffa450edef68
2009-07-12Added an implementation of Tequals(expect, found, mesg)Paul Joseph Davis
As per request of Jan. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@793403 13f79535-47bb-0310-9956-ffa450edef68
2009-07-11Updated the custom test run to use a locally defined T() function.Paul Joseph Davis
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@793233 13f79535-47bb-0310-9956-ffa450edef68
2009-07-11Only update a document's _id and _rev if the save was successful.Paul Joseph Davis
Thanks Jason Davies. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@793218 13f79535-47bb-0310-9956-ffa450edef68
2009-07-11Forgot to add custom_test.html to share/Makefile.amPaul Joseph Davis
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@793217 13f79535-47bb-0310-9956-ffa450edef68
2009-07-11Create tests in Futon.Paul Joseph Davis
On the test suite page there is now a button that will give you a page to create a custom test that can then be submitted along with JIRA tickets. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@793214 13f79535-47bb-0310-9956-ffa450edef68
2009-07-11send Location header for new or updated attachmentsJan Lehnardt
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@793205 13f79535-47bb-0310-9956-ffa450edef68
2009-07-11tabs -> spaces, other whitespaceJan Lehnardt
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@793199 13f79535-47bb-0310-9956-ffa450edef68
2009-07-10fix whitespaceJan Lehnardt
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@792959 13f79535-47bb-0310-9956-ffa450edef68
2009-07-10remove log statementJan Lehnardt
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@792931 13f79535-47bb-0310-9956-ffa450edef68
2009-07-10fix attachment etags, thanks Mark Hammond for the test case. closes COUCHDB-386John Christopher Anderson
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@792774 13f79535-47bb-0310-9956-ffa450edef68
2009-07-10Apply patch from Benoit Chesneau's COUCHDB-404John Christopher Anderson
Restores 0.8-style /db/_view view urls and adds an option to render views and documents as other formats like: /db/docid?show=blog/post /db/_view/blog/posts?list=index We're retaining the longer _design/appname paths as well because that resource is valuable for reverse proxies and rewriters. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@792771 13f79535-47bb-0310-9956-ffa450edef68
2009-07-09fix and test for scrambling of large inline attachmentsAdam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@792618 13f79535-47bb-0310-9956-ffa450edef68
2009-07-08Fixes COUCHDB-389Paul Joseph Davis
Provide an offset calculation for all view responses. Thanks Brad Anderson. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@792013 13f79535-47bb-0310-9956-ffa450edef68
2009-07-07fix deleted_conflicts qs parameterAdam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@791684 13f79535-47bb-0310-9956-ffa450edef68