couchdb-chttpd.git
6 years agoMatch old behavior when buffering is disabled 2724-chunked-buffering 38/head
Adam Kocoloski [Wed, 22 Jul 2015 18:14:48 +0000 (14:14 -0400)] 
Match old behavior when buffering is disabled

If the threshold is set to zero we make sure to send a separate chunk to
close the JSON, otherwise we just merge it into the previous chunk.

6 years agoRemove support for CouchDB =< 1.0.0
Adam Kocoloski [Wed, 22 Jul 2015 18:10:43 +0000 (14:10 -0400)] 
Remove support for CouchDB =< 1.0.0

Thise UA-sniffing code has been in place to ensure interop with clients
running CouchDB versions older than 1.0.1. We should be safe to remove
it now.

6 years agoDefine an accessor for the chunk buffer config val
Adam Kocoloski [Tue, 21 Jul 2015 13:57:24 +0000 (09:57 -0400)] 
Define an accessor for the chunk buffer config val

6 years agoAllow configurable buffer size for all_docs, views
Adam Kocoloski [Mon, 20 Jul 2015 21:16:10 +0000 (17:16 -0400)] 
Allow configurable buffer size for all_docs, views

Now that couch_mrview can buffer chunked responses we should pass the
config value for the buffer size to it.

6 years agoExecute a callback for every complete DB traversal
Adam Kocoloski [Wed, 24 Jun 2015 17:56:18 +0000 (13:56 -0400)] 
Execute a callback for every complete DB traversal

This ensures that we don't enter a receive statement waiting for new DB
updates without first flushing the buffer.

COUCHDB-2724

6 years agoAdd basic buffering support for other feed types
Adam Kocoloski [Wed, 24 Jun 2015 17:47:01 +0000 (13:47 -0400)] 
Add basic buffering support for other feed types

With this code it is possible that changes are buffered for a long
period of time and not sent out. Will work on addressing that next.

COUCHDB-2724

6 years agoBuffer rows for normal/longpoll feeds
Adam Kocoloski [Tue, 23 Jun 2015 01:45:26 +0000 (21:45 -0400)] 
Buffer rows for normal/longpoll feeds

This patch causes the coordinator to accumulate data in its own buffer
and reduce the number of calls to write data on the socket. The size of
the buffer is configurable:

[httpd]
chunked_response_buffer = 1490

The default is chosen to approximately fill a standard Ethernet frame.

COUCHDB-2724

7 years agoUse a record for changes_callback accumulator
Adam Kocoloski [Mon, 22 Jun 2015 23:41:37 +0000 (19:41 -0400)] 
Use a record for changes_callback accumulator

This change allows us to evolve the accumulator in a less-brittle way
and sets the stage for new data to be held in the accumulator to address
COUCHDB-2724.

In the course of this change I also switched the feed labels from strings
to atoms (they're only used for pattern matching in the accumulator, and
multiple matches are executed for every row in the feed, so it seemed
silly to be using Erlang lists for that comparison), and I explicitly
indicated when we start a chunked response instead of guessing it
heuristically based on other contents in the accumulator.

COUCHDB-2724

7 years agoRemove temporary upgrade clause
Adam Kocoloski [Mon, 22 Jun 2015 23:15:23 +0000 (19:15 -0400)] 
Remove temporary upgrade clause

This clause was only needed for a very old hot code upgrade.

7 years agoIncrease nonce size by a byte
Paul J. Davis [Mon, 3 Nov 2014 22:15:29 +0000 (16:15 -0600)] 
Increase nonce size by a byte

7 years agoDiscard request body after request
Robert Newson [Mon, 1 Jun 2015 14:12:21 +0000 (15:12 +0100)] 
Discard request body after request

If a client sends a request body for a request that fails because the
database does not exist, they receive a 404 response but the request
body is not read. This prevents the next request on the same socket
being handled correctly.

Ensure the request body is consumed for every request.

7 years agoBe more precisely on HTTP 404/405 responses for /_nodes/$node/*
Alexander Shorin [Thu, 18 Jun 2015 17:26:41 +0000 (20:26 +0300)] 
Be more precisely on HTTP 404/405 responses for /_nodes/$node/*

7 years agoFix comments for /_node/$node handlers
Alexander Shorin [Thu, 18 Jun 2015 16:40:04 +0000 (19:40 +0300)] 
Fix comments for /_node/$node handlers

7 years agoMove node-specific endpoints under /_node/$name
Robert Newson [Thu, 18 Jun 2015 15:56:32 +0000 (16:56 +0100)] 
Move node-specific endpoints under /_node/$name

7 years agoAdd _node_config, an endpoint to configure specific nodes from any node
Robert Newson [Wed, 17 Jun 2015 13:41:50 +0000 (14:41 +0100)] 
Add _node_config, an endpoint to configure specific nodes from any node

7 years agoRevert "Remove _config route on cluster"
Robert Newson [Wed, 17 Jun 2015 11:32:16 +0000 (12:32 +0100)] 
Revert "Remove _config route on cluster"

This reverts commit 2a583cb0dfcd446ae259b272acd58068079c9b52.

7 years agoSupport virtual hosts
Robert Newson [Wed, 17 Jun 2015 10:31:50 +0000 (11:31 +0100)] 
Support virtual hosts

7 years agoDisable couch_httpd_cors when chttpd_cors is active 2080-port-cors 160/head 8/head
Russell Branca [Thu, 6 Nov 2014 22:48:51 +0000 (14:48 -0800)] 
Disable couch_httpd_cors when chttpd_cors is active

7 years agoCORS implementation for chttpd
Russell Branca [Wed, 5 Nov 2014 00:07:38 +0000 (16:07 -0800)] 
CORS implementation for chttpd

7 years agoadd _changes?feed=live sugar for continuous
Robert Kowalski [Sun, 1 Mar 2015 14:42:24 +0000 (15:42 +0100)] 
add _changes?feed=live sugar for continuous

allow `feed=live` as sugar for `continuous` which is hard to type.
PouchDB already supports `live`.

PRs for the change:
https://github.com/apache/couchdb/pull/307
https://github.com/apache/couchdb-couch/pull/40
https://github.com/apache/couchdb-chttpd/pull/28

closes COUCHDB-2237

7 years agoFix chttpd tests using new test_util:start_applications protocol
Alexander Shorin [Thu, 23 Apr 2015 20:50:54 +0000 (23:50 +0300)] 
Fix chttpd tests using new test_util:start_applications protocol

7 years agoMerge remote-tracking branch 'iilyak/2656-use-chttpd-functions'
Alexander Shorin [Thu, 23 Apr 2015 20:37:52 +0000 (23:37 +0300)] 
Merge remote-tracking branch 'iilyak/2656-use-chttpd-functions'

This closes #31

COUCHDB-2656

7 years agoTolerate empty candidate list
Robert Newson [Fri, 3 Oct 2014 14:23:54 +0000 (15:23 +0100)] 
Tolerate empty candidate list

7 years agoUse attachment checksum as Etag if possible
Robert Newson [Sun, 19 Apr 2015 09:41:14 +0000 (10:41 +0100)] 
Use attachment checksum as Etag if possible

Fixes COUCHDB-2668

Originally fixed in COUCHDB-1337

7 years agojson_req_obj compartible with backdoor interface 31/head
ILYA Khlopotov [Thu, 16 Apr 2015 14:50:58 +0000 (07:50 -0700)] 
json_req_obj compartible with backdoor interface

Clustered call would return additional fields:

- requested_path
- raw_path
- secObj

COUCHDB-2656

7 years agoRemove /_sleep endpoint 32/head
Alexander Shorin [Mon, 13 Apr 2015 20:03:48 +0000 (23:03 +0300)] 
Remove /_sleep endpoint

7 years agoExport etag_match/2
ILYA Khlopotov [Tue, 7 Apr 2015 15:49:53 +0000 (08:49 -0700)] 
Export etag_match/2

COUCHDB-2656

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