couchdb-chttpd.git
7 years agoAccept is_r_met=true query parameter 2655-r-met 163/head
Robert Newson [Thu, 2 Apr 2015 10:46:35 +0000 (11:46 +0100)] 
Accept is_r_met=true query parameter

COUCHDB-2655

7 years agoadd license file
Robert Kowalski [Fri, 13 Mar 2015 02:45:09 +0000 (03:45 +0100)] 
add license file

7 years agoMerge remote-tracking branch 'kxepal/rename-system-databases'
Alexander Shorin [Thu, 26 Feb 2015 20:23:38 +0000 (23:23 +0300)] 
Merge remote-tracking branch 'kxepal/rename-system-databases'

This closes #27

7 years agoRename "shard_db" option to "shards_db" 27/head
Alexander Shorin [Thu, 26 Feb 2015 18:55:25 +0000 (21:55 +0300)] 
Rename "shard_db" option to "shards_db"

COUCHDB-2628

7 years agoAdd underscore prefix for dbs database name
Alexander Shorin [Wed, 25 Feb 2015 21:39:45 +0000 (00:39 +0300)] 
Add underscore prefix for dbs database name

That's how we name system databases and there should be no exceptions.

COUCHDB-2619

7 years agoRemove _config route on cluster 25/head
Robert Kowalski [Thu, 19 Feb 2015 20:21:25 +0000 (21:21 +0100)] 
Remove _config route on cluster

In order to avoid users shooting themselves in the foot by using
`/_config/` on a clustered CouchDB with a loadbalancer in front,
we remove it on `15984` - it will be available for single-node-
mode on the backdoor port (`15986`) or for users that are feeling
lucky which want to fire curl requests to every node.

It also allows Fauxton to detect if it is running on a the backdoor
port. Fauxton will - if it gets a 200 instead of a 404 - show the
config-section to the user.

COUCHDB-2601 COUCHDB-2390 COUCHDB-2343

7 years agoadd mango URL endpoints
Jan Lehnardt [Sun, 8 Feb 2015 13:26:16 +0000 (14:26 +0100)] 
add mango URL endpoints

7 years agoReturn ok:true on _bulk_doc update
Robert Kowalski [Wed, 19 Nov 2014 01:11:25 +0000 (02:11 +0100)] 
Return ok:true on _bulk_doc update

Return `ok: true` on a successful _bulk_doc update like in
CouchDB 1.6.

Example success message on 2.0 (broken):
```
[{"id":"Brocket","rev":"6-b6fa9e703c3eb92aa9c3a49cedf1e8c2"}]
```

Example error message on 2.0:
```
[{"id":"Blaggie-System","error":"conflict",
  "reason":"Document update conflict."}]
```

Example success message on 1.x:
```
[{"id":"Brocket", "ok": true, "rev":"6-b6fa9e703c3eb92aa9c3a49cedf1e8c2"}]
```

Finally closes COUCHDB-2462

7 years agoFix typo in config listener module name
Alexander Shorin [Thu, 5 Feb 2015 11:17:52 +0000 (14:17 +0300)] 
Fix typo in config listener module name

7 years agoMerge remote-tracking branch 'iilyak/2561-make-config-API-consistent'
Alexander Shorin [Wed, 4 Feb 2015 15:43:16 +0000 (18:43 +0300)] 
Merge remote-tracking branch 'iilyak/2561-make-config-API-consistent'

This closes #21

COUCHDB-2561

7 years agoDon't restart event handler on termination 21/head
ILYA Khlopotov [Fri, 30 Jan 2015 19:06:12 +0000 (11:06 -0800)] 
Don't restart event handler on termination

COUCHDB-2561

7 years agoconfig:get/3 is more strict now
ILYA Khlopotov [Thu, 29 Jan 2015 21:34:31 +0000 (13:34 -0800)] 
config:get/3 is more strict now

The config:get/3 supports only following types for default argument
  - atom `undefined`
  - string (list)
  - boolean
  - float
  - integer

COUCDB-2561

7 years agoUpdate config_listener behaviuor
ILYA Khlopotov [Thu, 29 Jan 2015 21:33:57 +0000 (13:33 -0800)] 
Update config_listener behaviuor

COUCHDB-2561

7 years agoParse attachment-related parameters for /_changes
Will Holley [Mon, 2 Feb 2015 20:56:29 +0000 (20:56 +0000)] 
Parse attachment-related parameters for /_changes

Match the way that couch_httpd_db:parse_changes_query handles attachment
related query parameters.

This closes #23

COUCHDB-2522

Signed-off-by: Alexander Shorin <kxepal@apache.org>
7 years agoEnable POST requests to /_changes in clustered CouchDB
Will Holley [Sat, 31 Jan 2015 10:46:30 +0000 (10:46 +0000)] 
Enable POST requests to /_changes in clustered CouchDB

Appropriate handling of a POST to _changes is already in place in
single node CouchDB. In clustered CouchDB, allow POST requests to pass
through to the underlying handler and existing logic will do the rest.

This closes #22

COUCHDB-2530

Signed-off-by: Alexander Shorin <kxepal@apache.org>
7 years agoMerge remote-tracking branch 'iilyak/1145-_local_docs-handler'
Alexander Shorin [Fri, 30 Jan 2015 07:39:23 +0000 (10:39 +0300)] 
Merge remote-tracking branch 'iilyak/1145-_local_docs-handler'

Conflicts:
src/chttpd_db.erl

This closes #16

COUCHDB-1145

7 years agoSet view type before validating _all_docs parameters.
Will Holley [Thu, 29 Jan 2015 17:59:39 +0000 (17:59 +0000)] 
Set view type before validating _all_docs parameters.

Matching couch_mrview, set view_type to "map" before validating query
parameters for _all_docs. This fixes a bug whereby validation fails
when specifying _all_docs?conflicts=true.

This closes #20

COUCHDB-2523

Signed-off-by: Alexander Shorin <kxepal@apache.org>
7 years agovalidate _all_docs query parameters
Will Holley [Thu, 29 Jan 2015 10:19:34 +0000 (10:19 +0000)] 
validate _all_docs query parameters

Perform the same query parameter validation in the clustered interface
for /_all_docs requests as we do in the non-clustered interface.

This closes 19

COUCHDB-2523

Signed-off-by: Alexander Shorin <kxepal@apache.org>
7 years agoadd setup
Jan Lehnardt [Fri, 31 Oct 2014 14:53:10 +0000 (15:53 +0100)] 
add setup

7 years agoUse ADMIN_CTX macro from couch_db.hrl
Alexander Shorin [Mon, 26 Jan 2015 04:07:43 +0000 (07:07 +0300)] 
Use ADMIN_CTX macro from couch_db.hrl

7 years agoConvert {timeout, Error} errors to timeout
Mike Wallace [Thu, 15 Jan 2015 15:31:09 +0000 (15:31 +0000)] 
Convert {timeout, Error} errors to timeout

If chttpd got a {timeout, Error} error then it would return
that tuple to the client. Since Error is some internal specifics
this isn't particularly useful information to return to the client.

This commit converts it to our usual timeout response.

This closes #18

COUCHDB-2425

Signed-off-by: Alexander Shorin <kxepal@apache.org>
7 years agoMerge remote-tracking branch 'kxepal/2538-revert-500-error-reason-changes'
Alexander Shorin [Wed, 21 Jan 2015 01:40:05 +0000 (04:40 +0300)] 
Merge remote-tracking branch 'kxepal/2538-revert-500-error-reason-changes'

This closes #17

7 years agoRestore <<"unknown_error">> for HTTP 500 errors 17/head
Alexander Shorin [Fri, 9 Jan 2015 15:32:28 +0000 (18:32 +0300)] 
Restore <<"unknown_error">> for HTTP 500 errors

This reverts changes made in 059229777 commit allowing chttpd to send
HTTP 500 errors in the same format as httpd does, e.g.:

  {"error": "unknown_error", "reason": "function_clause", "ref": 100500}

COUCHDB-2538

7 years agoAdd tests for chttpd:error_info/1
Alexander Shorin [Wed, 21 Jan 2015 01:34:31 +0000 (04:34 +0300)] 
Add tests for chttpd:error_info/1

7 years agoRename argument to reflect new semantic 16/head
ILYA Khlopotov [Fri, 19 Dec 2014 16:48:05 +0000 (08:48 -0800)] 
Rename argument to reflect new semantic

7 years agoReuse _all_docs handler for _local_docs/_design_docs
ILYA Khlopotov [Fri, 19 Dec 2014 16:15:37 +0000 (08:15 -0800)] 
Reuse _all_docs handler for _local_docs/_design_docs

7 years agoAdd _local_docs and _design_docs handlers
ILYA Khlopotov [Thu, 18 Dec 2014 21:20:51 +0000 (13:20 -0800)] 
Add _local_docs and _design_docs handlers

COUCHDB-1145

7 years agoMerge branch '2517-open_revs=all-function_clause'
Paul J. Davis [Tue, 16 Dec 2014 20:57:06 +0000 (14:57 -0600)] 
Merge branch '2517-open_revs=all-function_clause'

Fixes #15

7 years agoRe-indent to reflect recent addtion of a case branch 15/head
ILYA Khlopotov [Mon, 8 Dec 2014 15:46:46 +0000 (07:46 -0800)] 
Re-indent to reflect recent addtion of a case branch

COUCHDB-2517

7 years agoReturn error when open_revs=all and document doesn't exist
ILYA Khlopotov [Mon, 8 Dec 2014 15:45:00 +0000 (07:45 -0800)] 
Return error when open_revs=all and document doesn't exist

COUCHDB-2517

7 years agoMerge branch '2491-refactor-couch-httpd-auth'
Paul J. Davis [Fri, 12 Dec 2014 20:33:34 +0000 (14:33 -0600)] 
Merge branch '2491-refactor-couch-httpd-auth'

Fixes #13

7 years agoUpdate chttpd_auth_cache for new couch_auth_cache 2491-refactor-couch-httpd-auth 13/head 162/head
Paul J. Davis [Thu, 4 Dec 2014 19:13:42 +0000 (13:13 -0600)] 
Update chttpd_auth_cache for new couch_auth_cache

This updates the interface to chttpd_auth_cache to match the new
callback API expected by couch_httpd_auth. Specifically this allows for
the upgraded user documents to be written back to the correct user
database.

COUCHDB-2491

7 years agoFix location-header for documents with newlines in the name 7/head
Robert Kowalski [Sat, 25 Oct 2014 02:45:07 +0000 (04:45 +0200)] 
Fix location-header for documents with newlines in the name

Properly urlencode the Document-Id in the Location-field of the
header

Based on a patch from Sean Bartell <wingedtachikoma@gmail.com>
COUCHDB-708

7 years agofix filtered replication
Robert Newson [Thu, 9 Oct 2014 18:48:07 +0000 (19:48 +0100)] 
fix filtered replication

7 years agoRebrand X-Cloudant-Stack-Hash header for CouchDB
Alexander Shorin [Wed, 24 Sep 2014 20:51:21 +0000 (00:51 +0400)] 
Rebrand X-Cloudant-Stack-Hash header for CouchDB

7 years agoUse couch_log instead of ?LOG_*
Alexander Shorin [Wed, 24 Sep 2014 15:38:38 +0000 (19:38 +0400)] 
Use couch_log instead of ?LOG_*

7 years agoAdd CORS headers to chttpd_external:send_external_response
Russell Branca [Wed, 10 Sep 2014 22:20:40 +0000 (15:20 -0700)] 
Add CORS headers to chttpd_external:send_external_response

COUCHDB-2328

7 years agoMake parse_external_response work with binaries and lists
Russell Branca [Wed, 10 Sep 2014 22:18:57 +0000 (15:18 -0700)] 
Make parse_external_response work with binaries and lists

COUCHDB-2328

7 years agoSend num_mp_writers to correct N
Robert Newson [Mon, 15 Sep 2014 23:20:36 +0000 (00:20 +0100)] 
Send num_mp_writers to correct N

7 years agoForward-port caching and csp headers for _utils
Robert Newson [Mon, 8 Sep 2014 17:11:00 +0000 (18:11 +0100)] 
Forward-port caching and csp headers for _utils

7 years agoRemove chttpd/couchdb stats split
Robert Newson [Thu, 4 Sep 2014 12:12:24 +0000 (13:12 +0100)] 
Remove chttpd/couchdb stats split

The way that chttpd delegates to couch_httpd makes it difficult to
separate http states via 5984 vs 5986.

7 years ago_all_dbs does not require admin
Robert Newson [Wed, 3 Sep 2014 18:23:12 +0000 (19:23 +0100)] 
_all_dbs does not require admin

7 years agoAdd remaining status code stats
Robert Newson [Tue, 2 Sep 2014 16:53:53 +0000 (17:53 +0100)] 
Add remaining status code stats

7 years agoMove stats cfg to correct place
Robert Newson [Tue, 2 Sep 2014 15:24:57 +0000 (16:24 +0100)] 
Move stats cfg to correct place

7 years agoDecrement clients_requesting_changes in a timely fashion
Robert Newson [Sat, 30 Aug 2014 10:52:24 +0000 (11:52 +0100)] 
Decrement clients_requesting_changes in a timely fashion

The previous approach using process_tracker was flawed. If a client
reuses a connection, as is common, the clients_requesting_changes
metric will only be decremented when the connection is terminated,
even if the connection is not requesting changes.

7 years agoCorrectly collect stats by status code
Robert Newson [Fri, 29 Aug 2014 20:10:04 +0000 (21:10 +0100)] 
Correctly collect stats by status code

7 years agoUse a distinct namespace for chttpd stats
Robert Newson [Fri, 29 Aug 2014 19:13:35 +0000 (20:13 +0100)] 
Use a distinct namespace for chttpd stats

7 years agoSwitch to couch_stats application windsor-merge
Robert Newson [Fri, 22 Aug 2014 18:10:13 +0000 (19:10 +0100)] 
Switch to couch_stats application

7 years agoRemove unused handle_restart_req
Paul J. Davis [Sun, 17 Aug 2014 02:25:03 +0000 (21:25 -0500)] 
Remove unused handle_restart_req

7 years agoBe more restrictive when including a JSON stack
Paul J. Davis [Sun, 17 Aug 2014 02:24:51 +0000 (21:24 -0500)] 
Be more restrictive when including a JSON stack

7 years agoAdded error_info for maintenance mode errors
Paul J. Davis [Sun, 17 Aug 2014 02:24:39 +0000 (21:24 -0500)] 
Added error_info for maintenance mode errors

7 years ago Only use cassim:set_security if cassim is enabled
Russell Branca [Mon, 30 Jun 2014 20:31:04 +0000 (13:31 -0700)] 
 Only use cassim:set_security if cassim is enabled

BugzId: 32070

7 years agoAdd cassim
Robert Newson [Wed, 30 Jul 2014 11:07:19 +0000 (12:07 +0100)] 
Add cassim

7 years agoIsolate update_doc logic from http logic
Russell Branca [Wed, 9 Apr 2014 22:04:19 +0000 (15:04 -0700)] 
Isolate update_doc logic from http logic

7 years agoSeparate update doc and sending the response in update_doc
Russell Branca [Tue, 8 Apr 2014 22:42:22 +0000 (15:42 -0700)] 
Separate update doc and sending the response in update_doc

7 years agoLog unexpected return value from att data fetch
Adam Kocoloski [Mon, 19 May 2014 20:52:01 +0000 (16:52 -0400)] 
Log unexpected return value from att data fetch

BugzID: 30891

7 years agoBe more careful when matching attachment data
Brian Mitchell [Fri, 16 May 2014 19:57:53 +0000 (15:57 -0400)] 
Be more careful when matching attachment data

This code was ported from a list comprehension which used
to properly ignore patterns which didn't match the Fd
tuple. This adds back the ability to ignore stub data
entries as this does come up in one case where att_since is
passed in via the API.

7 years agoAdd the request id and timing info in chttpd:send_response
Russell Branca [Fri, 28 Mar 2014 17:33:43 +0000 (10:33 -0700)] 
Add the request id and timing info in chttpd:send_response

7 years agoUpdate chttpd_external with s/couch_httpd/chttpd/
Russell Branca [Fri, 28 Mar 2014 17:25:46 +0000 (10:25 -0700)] 
Update chttpd_external with s/couch_httpd/chttpd/

Switch to using chttpd:send_{json,response} from chttpd_external so
that _show and _update functions are properly sending CORS headers.

7 years agohonor ?rev for PUT and validate against _rev/etag
Randall Leeds [Fri, 9 Sep 2011 00:23:50 +0000 (00:23 +0000)] 
honor ?rev for PUT and validate against _rev/etag

Fixes COUCHDB-1268

git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1166945 13f79535-47bb-0310-9956-ffa450edef68

7 years agoHonor max_document_size when receiving body in externals
Robert Newson [Wed, 8 Jan 2014 18:05:57 +0000 (18:05 +0000)] 
Honor max_document_size when receiving body in externals

BugzID: 26773

7 years agoMove attachment code into couch_att
Brian Mitchell [Thu, 12 Dec 2013 04:09:54 +0000 (23:09 -0500)] 
Move attachment code into couch_att

This is an attempt to isolate the attachment record and
some related code. This will allow seamless upgrades
over time.

7 years agoAdd CORS support
Robert Newson [Wed, 30 Jul 2014 10:05:41 +0000 (11:05 +0100)] 
Add CORS support

7 years agoAdd error_info clause for nodedown errors
Paul J. Davis [Thu, 12 Dec 2013 18:42:53 +0000 (12:42 -0600)] 
Add error_info clause for nodedown errors

BugzId: 26122

7 years agoImprove HTTP error log formatting
Paul J. Davis [Thu, 12 Dec 2013 18:38:10 +0000 (12:38 -0600)] 
Improve HTTP error log formatting

The use of `~p` for binaries and stacks wasn't very useful. This just
changes things around as well as puts the stack on a new line indented
four spaces so that its readable.

BugzId: 26121

7 years agoFix JSON encoding for missing revisions
Paul J. Davis [Wed, 11 Dec 2013 17:11:52 +0000 (11:11 -0600)] 
Fix JSON encoding for missing revisions

This is a super old bug from when we switched to Jiffy. Jiffy doesn't
support Erlang strings as object keys due to Unicode issues. This just
changes the "missing" string to a <<"missing">> binary.

BugzId: 26050

7 years agoImprove logging of errors with traces
Robert Newson [Tue, 10 Dec 2013 00:44:04 +0000 (00:44 +0000)] 
Improve logging of errors with traces

7 years agoset module version to 1
Robert Newson [Fri, 22 Nov 2013 16:44:56 +0000 (16:44 +0000)] 
set module version to 1

7 years agoEnsure result of send_delayed_error is always a #delayed_resp
Robert Newson [Sat, 16 Nov 2013 17:31:04 +0000 (17:31 +0000)] 
Ensure result of send_delayed_error is always a #delayed_resp

BugzID: 25402

7 years agoDon't return stacktraces, log them instead.
Robert Newson [Thu, 7 Nov 2013 19:36:33 +0000 (19:36 +0000)] 
Don't return stacktraces, log them instead.

BugzID: 17674

7 years agoFix case_clause error with POST to _replicate
Paul J. Davis [Tue, 22 Oct 2013 04:57:37 +0000 (23:57 -0500)] 
Fix case_clause error with POST to _replicate

We were matching without specifying a default value. Rather than end up
causing other errors we just match on false and default true for all
other values.

BugzId: 24355

7 years agoAvoid VM log messages about uncaught errors
Paul J. Davis [Thu, 17 Oct 2013 21:09:42 +0000 (16:09 -0500)] 
Avoid VM log messages about uncaught errors

We defer doc updates to a child process so that we avoid mixing fabric
messages together between HTTP requests. This just makes the defer
cleaner so that the VM doesn't log when we throw a conflict error.

BugzId: 24264

7 years agoReport pending count in _changes
Adam Kocoloski [Thu, 17 Oct 2013 18:36:11 +0000 (14:36 -0400)] 
Report pending count in _changes

BugzID: 24236

7 years agoWrap decompression in a try/catch, report 400
Adam Kocoloski [Wed, 16 Oct 2013 19:20:21 +0000 (15:20 -0400)] 
Wrap decompression in a try/catch, report 400

BugzID: 24000

7 years agoFix unused variable warning
Adam Kocoloski [Wed, 16 Oct 2013 18:20:33 +0000 (14:20 -0400)] 
Fix unused variable warning

7 years agoTry to cancel a replication everywhere
Adam Kocoloski [Wed, 16 Oct 2013 17:23:14 +0000 (13:23 -0400)] 
Try to cancel a replication everywhere

Cancelation requests sometimes omit source and target information in
favor of a replication ID.  When that happens the logic that selects the
owner for the replication picks the wrong node, and the cancelation
fails with a not_found error.  This patch causes the request to be
submitted to all nodes in the cluster.  We report success if at least
one node reports success, otherwise we report (one of) the errors that
we received.

BugzID: 21976

7 years agoAdd statistics for couch_db_updater message queues
Benjamin Anderson [Sat, 12 Oct 2013 02:29:23 +0000 (22:29 -0400)] 
Add statistics for couch_db_updater message queues

BugzID: 24167

7 years agoAllows clients to send gzipped JSON bodies
Adam Kocoloski [Wed, 9 Oct 2013 15:37:18 +0000 (11:37 -0400)] 
Allows clients to send gzipped JSON bodies

A request with a Content-Encoding other than "gzip" or "identity" will
receive a 415 Unsupported Media Type response.

BugzID: 24000

7 years agoAdd error formatting for maintenance mode
Paul J. Davis [Fri, 4 Oct 2013 22:36:55 +0000 (17:36 -0500)] 
Add error formatting for maintenance mode

If all nodes end up in maintenance mode we need to report that progress
isn't possible due to a "nodedown".

7 years agoSupport "seq_interval" qs param on _changes
Adam Kocoloski [Wed, 2 Oct 2013 01:47:50 +0000 (21:47 -0400)] 
Support "seq_interval" qs param on _changes

Supplying seq_interval=N will cause the changes feed to include a
sequence on every Nth row but set seq: null otherwise.  It's a
performance hack until we can deploy a more efficient format.

BugzID: 23637

7 years agoAdd boilerplate for global_changes
Benjamin Bastian [Sat, 21 Sep 2013 19:33:16 +0000 (12:33 -0700)] 
Add boilerplate for global_changes

7 years agoValidate _bulk_docs POST bodies
Benjamin Anderson [Fri, 16 Aug 2013 22:09:59 +0000 (15:09 -0700)] 
Validate _bulk_docs POST bodies

This patch supplies some necessary input validation that
couch_doc:from_json_obj/1 can't provide. It eliminates spurious HTTP
500s and stacktraces from _bulk_docs POST bodies of the following
invalid formats:

    {"docs": {"_id": "foo"}}
    {"_id": "foo"}

BugzID: 21746

7 years agoRemove unnecessary pattern match and associated extraneous _rev check
Benjamin Anderson [Fri, 16 Aug 2013 22:07:25 +0000 (15:07 -0700)] 
Remove unnecessary pattern match and associated extraneous _rev check

The pattern match breaks when users submit _bulk_docs requests of the
format:

    {"docs": [[{"_id": "foo"}]]}

couch_doc:from_json_obj/1 already performs the appropriate _rev logic,
so that check is unnecessary.

BugzID: 21746

7 years agoHandle undefined result from process_info
Robert Newson [Thu, 15 Aug 2013 14:21:05 +0000 (15:21 +0100)] 
Handle undefined result from process_info

BugzID: 21827

7 years agoReturn stats for couch_file mailboxes in _system requests
Benjamin Anderson [Fri, 2 Aug 2013 20:27:52 +0000 (13:27 -0700)] 
Return stats for couch_file mailboxes in _system requests

7 years agoallow case-insensitive content-type from external, and other cleanup
Adam Kocoloski [Fri, 9 Oct 2009 01:54:48 +0000 (01:54 +0000)] 
allow case-insensitive content-type from external, and other cleanup

git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@823378 13f79535-47bb-0310-9956-ffa450edef68

7 years agoProvide a dedicated NOLB mode
Adam Kocoloski [Fri, 7 Jun 2013 15:17:31 +0000 (11:17 -0400)] 
Provide a dedicated NOLB mode

Setting [cloudant] maintenance_mode = nolb recovers the original
behavior of setting maintenance_mode to true; i.e., the node will not
participate in load balancing but is otherwise an active member of the
cluster.

BugzID: 18955

7 years agoAdd _reload_query_servers, report stale proc count
Adam Kocoloski [Thu, 6 Jun 2013 16:13:00 +0000 (12:13 -0400)] 
Add _reload_query_servers, report stale proc count

BugzID: 19529

7 years agoThrow HTTP 413 is max_document_size is exceeded
Mike Wallace [Fri, 24 May 2013 10:19:00 +0000 (11:19 +0100)] 
Throw HTTP 413 is max_document_size is exceeded

BugzID: 19888

This is a backport of
Apache/CouchDB@bf1eb135f2b46861474b9276dee02d8edb05fe3b

7 years agoThrow 400 bad request not 500 for unrecognised _changes feed param
Michael Rhodes [Wed, 8 May 2013 14:52:31 +0000 (15:52 +0100)] 
Throw 400 bad request not 500 for unrecognised _changes feed param

7 years agoReject large Range requests
Robert Newson [Sun, 11 Sep 2011 10:50:11 +0000 (10:50 +0000)] 
Reject large Range requests

Return a 200 response for any Range request that covers the entire entity
or that contains more than 10 byte ranges.

git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1168196 13f79535-47bb-0310-9956-ffa450edef68

7 years agoAdd _shards db handler auth check
Russell Branca [Fri, 12 Apr 2013 20:47:20 +0000 (16:47 -0400)] 
Add _shards db handler auth check

7 years agoGive fabric a string, not a number
Adam Kocoloski [Thu, 11 Apr 2013 03:45:14 +0000 (23:45 -0400)] 
Give fabric a string, not a number

7 years agoAllow write quorum control in POST body
Adam Kocoloski [Wed, 10 Apr 2013 16:24:13 +0000 (12:24 -0400)] 
Allow write quorum control in POST body

BugzID: 18457

7 years ago Add X-Couch-Update-NewRev and X-Couch-Id to _update response
Michael Rhodes [Sun, 7 Apr 2013 01:54:47 +0000 (21:54 -0400)] 
 Add X-Couch-Update-NewRev and X-Couch-Id to _update response

This is porting commits from CouchDB:

ef7ab7e4e414d53fe5c12993d29b193ed3cdfd42
 - allow client to get new _rev from _update via X-Couch-Update-NewRev
 - I left out porting the JS test
98515bf0b990ca096ec5a47b9cd048427a0ec66c
 - Return X-Couch-Id from show functions if doc is created

7 years agoRemove trailing whitespace in chttpd_show
Michael Rhodes [Sun, 7 Apr 2013 01:52:58 +0000 (21:52 -0400)] 
Remove trailing whitespace in chttpd_show

7 years agoUse couch_httpd_db:parse_copy_destination_header
Mike Wallace [Tue, 2 Apr 2013 12:45:33 +0000 (13:45 +0100)] 
Use couch_httpd_db:parse_copy_destination_header

Remove parse_copy_destination_header and use the function defined
in couch_httpd_db instead.

Requires cloudant/dbcore@e9745834c164f6ef7f9e583bc4c36cdd83c415f4
so that parse_copy_destination_header is exported and has the
relevant backported code to throw an HTTP 400 if the COPY request
header does not have a Destination field.

BugzID: 18659

7 years agoAllow ?deleted=true on doc GET's
Robert Newson [Fri, 15 Mar 2013 18:09:59 +0000 (18:09 +0000)] 
Allow ?deleted=true on doc GET's

7 years agoFix cancel by replication_id
Robert Newson [Mon, 11 Mar 2013 02:35:32 +0000 (21:35 -0500)] 
Fix cancel by replication_id

BugzID: 17969

7 years agoHonor "w" parameter for update handlers
Robert Newson [Sat, 9 Mar 2013 21:45:40 +0000 (15:45 -0600)] 
Honor "w" parameter for update handlers

BugzID: 17936