Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Dec 21, 2010
Robert Dionne Cleanly terminate view responses on timeout, BugzID 11432 7dd0c03
Commits on Dec 28, 2010
Robert Dionne allow Q to be passed to db_create/db_delete calls de5bffe
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/chttpd_db.erl
View
8 src/chttpd_db.erl
@@ -155,7 +155,8 @@ create_db_req(#httpd{}=Req, DbName) ->
couch_httpd:verify_is_server_admin(Req),
N = couch_httpd:qs_value(Req, "n", couch_config:get("cluster", "n", "3")),
Q = couch_httpd:qs_value(Req, "q", couch_config:get("cluster", "q", "8")),
- case fabric:create_db(DbName, [{n,N}, {q,Q}]) of
+ W = couch_httpd:qs_value(Req, "w", couch_config:get("cluster", "w", "2")),
+ case fabric:create_db(DbName, [{n,N}, {q,Q}, {w, W}]) of
ok ->
DocUrl = absolute_uri(Req, "/" ++ couch_util:url_encode(DbName)),
send_json(Req, 201, [{"Location", DocUrl}], {[{ok, true}]});
@@ -167,7 +168,8 @@ create_db_req(#httpd{}=Req, DbName) ->
delete_db_req(#httpd{}=Req, DbName) ->
couch_httpd:verify_is_server_admin(Req),
- case fabric:delete_db(DbName, []) of
+ W = couch_httpd:qs_value(Req, "w", couch_config:get("cluster", "w", "2")),
+ case fabric:delete_db(DbName, [{w,W}]) of
ok ->
send_json(Req, 200, {[{ok, true}]});
Error ->
@@ -441,7 +443,7 @@ all_docs_callback(complete, {_, Resp}) ->
send_chunk(Resp, "\r\n]}"),
end_json_response(Resp);
all_docs_callback({error, Reason}, {_, Resp}) ->
- chttpd:send_chunked_error(Resp, {error, Reason}).
+ chttpd:send_chunked_error(Resp, Reason).
db_doc_req(#httpd{method='DELETE'}=Req, Db, DocId) ->
% check for the existence of the doc to handle the 404 case.

No commit comments for this range

Something went wrong with that request. Please try again.