summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_httpd.erl
AgeCommit message (Collapse)Author
2009-09-17Fixes COUCHDB-504Paul Joseph Davis
Thanks to Bob Dionne for figuring out the underlying cause. Thanks to Benoit for making my initial patch alot cleaner. This version is basically Benoit's patch with two extra conditions for sending the Keep-Alive header. It must be a HTTP/1.0 connection and there must not be a Connection header already defined. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@816033 13f79535-47bb-0310-9956-ffa450edef68
2009-09-16Single line http request when log=infoDamien F. Katz
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@815927 13f79535-47bb-0310-9956-ffa450edef68
2009-08-27Fixed spurious console errors caused when attempting to query information ↵Damien F. Katz
about an already closed socket. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@808679 13f79535-47bb-0310-9956-ffa450edef68
2009-08-27Fix for problem where HEAD requests that would have a chunked responses ↵Damien F. Katz
would send the chunked respone anyway. Also, we now avoid processing the request, and instead abort it as soon as the header is sent. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@808632 13f79535-47bb-0310-9956-ffa450edef68
2009-08-18cleanup application of auth functionsAdam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@805551 13f79535-47bb-0310-9956-ffa450edef68
2009-08-18allow configurable X-Forwarded-Host header handling for work behind reverse ↵Jan Lehnardt
proxies, patch by Benoit Chesneau, closes COUCHDB-466 git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@805500 13f79535-47bb-0310-9956-ffa450edef68
2009-08-14benoitc's attachment PUT patch passes tests for me. Closes COUCHDB-461John Christopher Anderson
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@804094 13f79535-47bb-0310-9956-ffa450edef68
2009-08-14apply Benoit's patch fixing attachment content-length handling for GET from ↵John Christopher Anderson
COUCHDB-461 git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@804087 13f79535-47bb-0310-9956-ffa450edef68
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-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-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-07-14wheeeeeeeeNoah Slater
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@794057 13f79535-47bb-0310-9956-ffa450edef68
2009-07-06trimmed trailing whitespaceNoah Slater
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@791350 13f79535-47bb-0310-9956-ffa450edef68
2009-06-15Send CouchDB Server: header for all external queries. Fixes COUCHDB-379.Jan Lehnardt
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@784706 13f79535-47bb-0310-9956-ffa450edef68
2009-06-14merge list-iterator branch to trunk. changes JavaScript _list APIJohn Christopher Anderson
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@784601 13f79535-47bb-0310-9956-ffa450edef68
2009-05-23added an design doc option so that doc._local_seq can be available in the ↵John Christopher Anderson
map view. Closes COUCHDB-346 git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@777757 13f79535-47bb-0310-9956-ffa450edef68
2009-05-20Move default handler configuration to couch_httpd:start_link/0Paul Joseph Davis
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@776685 13f79535-47bb-0310-9956-ffa450edef68
2009-05-19Add a configuration parameter for the default database handler.Paul Joseph Davis
Closes COUCHDB-353 Thanks Brad Anderson git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@776143 13f79535-47bb-0310-9956-ffa450edef68
2009-05-17Fixes COUCHDB-41Paul Joseph Davis
When a database doesn't exist, it now returns: {"error": "not_found", "reason": "no_db_file"} git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@775577 13f79535-47bb-0310-9956-ffa450edef68
2009-05-13Closes COUCHDB-334 - Add JSONP support to CouchDBPaul Joseph Davis
Use JSONP by providing a ?callback=function_name URL paramter for any URL returning JSON data. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@774180 13f79535-47bb-0310-9956-ffa450edef68
2009-05-10refactor JSON body error handling, also consolidate update_docs JSON ↵John Christopher Anderson
response generation. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@773387 13f79535-47bb-0310-9956-ffa450edef68
2009-04-19COUCHDB-306 - Improving reported errors.Paul Joseph Davis
Case #3 turns out to be misusing the end-point for HTML forms that Futon uses. For new people it would also be triggered by accidentally using POST when a PUT to /db_name/docid is used. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@766505 13f79535-47bb-0310-9956-ffa450edef68
2009-04-18refactor main.js into many files and improve show/list error handlingJohn Christopher Anderson
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@766383 13f79535-47bb-0310-9956-ffa450edef68
2009-04-17output errors differently during chunked responses (view and list)John Christopher Anderson
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@765819 13f79535-47bb-0310-9956-ffa450edef68
2009-04-07Add null_authentication_handler. It is useful when running CouchDB behind an ↵Jan Lehnardt
authenticating proxy which proxies the basic auth http headers to CouchDB. Having no admins defined makes authentication impossible. Use the null_authentication_handler instead. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@762574 13f79535-47bb-0310-9956-ffa450edef68
2009-04-04Use now_diff instead of statistics(runtime). Closes COUCHDB-316Adam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@762019 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24make some error messages more readable, committed for jchrisJan Lehnardt
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@757714 13f79535-47bb-0310-9956-ffa450edef68
2009-03-15verbose error logging turned back on for http requests and log_level = debugJohn Christopher Anderson
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@754577 13f79535-47bb-0310-9956-ffa450edef68
2009-03-13Commit Damien's rep_security branch to trunk. John Christopher Anderson
Changes bulk_docs conflict checking. Breaks file format, see mailing list for data upgrade procedure, or http://wiki.apache.org/couchdb/Breaking_changes git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@753448 13f79535-47bb-0310-9956-ffa450edef68
2009-03-09merge design doc resource branch. breaking changes to _view query paths. John Christopher Anderson
closes COUCHDB-280 git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@751813 13f79535-47bb-0310-9956-ffa450edef68
2009-03-06validate reduce view list queries, make query_parse_error response code 400John Christopher Anderson
thanks Jan, thanks Jason Davies. closes COUCHDB-283 git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@750969 13f79535-47bb-0310-9956-ffa450edef68
2009-03-05consistency in messages (HTTPd -> httpd)Jan Lehnardt
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@750430 13f79535-47bb-0310-9956-ffa450edef68
2009-02-27- group HTTP method stats into httpd_requests_methods as per Christopher ↵Jan Lehnardt
Lenz's suggestion - renamed http_status_codes to httpd_status_codes - better internal variable naming - remove comments that were leftovers from earlier refactoring git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@748582 13f79535-47bb-0310-9956-ffa450edef68
2009-02-24added newline to JSON responses, closes COUCHDB-107Noah Slater
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@747465 13f79535-47bb-0310-9956-ffa450edef68
2009-02-22Add runtime statistics -- without EUnit tests for now.Jan Lehnardt
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@746691 13f79535-47bb-0310-9956-ffa450edef68
2009-02-14enhance the Mochiweb streaming api based on feedback from Bob IppolitoJohn Christopher Anderson
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@744309 13f79535-47bb-0310-9956-ffa450edef68
2009-02-13Accept standalone attachment PUTs with Transfer-Encoding: chunked John Christopher Anderson
Includes a patch to mochiweb_request that is under review for inclusion upstream. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@743971 13f79535-47bb-0310-9956-ffa450edef68
2009-02-11Fix for COUCHDB-238, explicit check and error for doc ids starting with ↵Damien F. Katz
underscore. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@743371 13f79535-47bb-0310-9956-ffa450edef68
2009-02-08extract method couch_httpd:send_redirect(Req, Path)John Christopher Anderson
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@742158 13f79535-47bb-0310-9956-ffa450edef68
2009-01-30swap 412 ad 409 error codes. fixes COUCHDB-226John Christopher Anderson
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@739157 13f79535-47bb-0310-9956-ffa450edef68
2009-01-30use the config setting for max document size. fixes COUCHDB-60John Christopher Anderson
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@739153 13f79535-47bb-0310-9956-ffa450edef68
2009-01-29Replacement of inets with ibrowse. Fixes COUCHDB-179 and enhances replication.John Christopher Anderson
Thanks Jason Davies and Adam Kocoloski for the fix, Maximillian Dornseif for reporting. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@739047 13f79535-47bb-0310-9956-ffa450edef68
2009-01-27Improved etag handling for show funcs and db_doc requests; main.js cleanup ↵John Christopher Anderson
(baby steps); null doc allowed for show funcs git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@738237 13f79535-47bb-0310-9956-ffa450edef68
2009-01-21don't log thrown errors in http requests, just things like badmatch etcJohn Christopher Anderson
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@736194 13f79535-47bb-0310-9956-ffa450edef68
2009-01-19fix for COUCHDB-214 (design docs on dbs with slashes)John Christopher Anderson
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@735850 13f79535-47bb-0310-9956-ffa450edef68
2009-01-19catch all error handling for HTTP requestsJohn Christopher Anderson
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@735803 13f79535-47bb-0310-9956-ffa450edef68
2009-01-15Support for streaming attachment writes.Damien F. Katz
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@734849 13f79535-47bb-0310-9956-ffa450edef68
2009-01-03Added decent reporting of Mochiweb start errors (eaddrinuse etc)John Christopher Anderson
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@731121 13f79535-47bb-0310-9956-ffa450edef68
2008-12-10view group state gen_server. thanks damien and davisp.John Christopher Anderson
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@724946 13f79535-47bb-0310-9956-ffa450edef68
2008-12-09user name should be binary for jsonJohn Christopher Anderson
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@724786 13f79535-47bb-0310-9956-ffa450edef68