commit | c60aebb10d5aa071d3e1456ef3ca949860213188 | [log] [tgz] |
---|---|---|
author | Jay Doane <jaydoane@apache.org> | Tue Aug 10 15:04:12 2021 -0700 |
committer | Jay Doane <jaydoane@apache.org> | Tue Aug 10 16:12:40 2021 -0700 |
tree | 84bc628107bacf26eb237d6a553509003c42e8da | |
parent | 96e2fff434e48d0b9e1c1f2c09be48da1a5cad24 [diff] |
Fix allowed method for ddoc update function The semantics of PUT [1] are arguably incorrect for executing an update function on a specified document, since nothing is being created or updated. Also it's not clear why it would be different from the POST used for executing an update function for `null` document. [2] Additionally, the example code-block in this section uses POST: POST /recipes/_design/recipe/_update/ingredients/SpaghettiWithMeatballs HTTP/1.1 All which lead me to believe that the PUT is a typo. The actual behavior of CouchDB doesn't help here, since it currently accepts any method whatsoever: $ curl -v -u adm localhost:15984/db-1/_design/ddoc/_update/change -X BOGUS > BOGUS /db-1/_design/bar/_update/change HTTP/1.1 > < HTTP/1.1 200 OK < content-length: 11 < content-type: text/html; charset=utf-8 < * Connection #0 to host localhost left intact Empty World* Closing connection 0 [1] https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html [2] https://docs.couchdb.org/en/latest/api/ddoc/render.html#post--db-_design-ddoc-_update-func
This repository contains the Sphinx source for Apache CouchDB's documentation. You can view the latest rendered build of this content at:
http://docs.couchdb.org/en/latest
Install Python3 and pip. Then:
$ python3 -m venv .venv $ source .venv/bin/activate $ pip install -r requirements.txt $ make html # builds the docs $ make check # syntax checks the docs
General feedback is welcome at our user or developer mailing lists.
Apache CouchDB has a CONTRIBUTING file with details on how to get started with issue reporting or contributing to the upkeep of this project.