Repository: couchdb-chttpd Updated Branches: refs/heads/master 72258e2f5 -> e5b1aee90
Don't set random ETag header for `_all_docs` view This fixes the issue that by setting a random ETag header, we implicitly promised that there's a chance of a cache hit where there was no chance. For 2.0, we simply remove the random ETag without replacement, in order to not accidentally cause useless cache bloat in clients. COUCHDB-2859 Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/e5b1aee9 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/e5b1aee9 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/e5b1aee9 Branch: refs/heads/master Commit: e5b1aee90e7e6c0b78f60b675f89a6e3f26a7931 Parents: 72258e2 Author: Klaus Trainer <[email protected]> Authored: Mon Nov 2 21:22:26 2015 +0100 Committer: Klaus Trainer <[email protected]> Committed: Mon Nov 2 21:22:26 2015 +0100 ---------------------------------------------------------------------- src/chttpd_db.erl | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/e5b1aee9/src/chttpd_db.erl ---------------------------------------------------------------------- diff --git a/src/chttpd_db.erl b/src/chttpd_db.erl index 3374654..842593e 100644 --- a/src/chttpd_db.erl +++ b/src/chttpd_db.erl @@ -615,18 +615,10 @@ all_docs_view(Req, Db, Keys, OP) -> Args1 = Args0#mrargs{view_type=map}, Args2 = couch_mrview_util:validate_args(Args1), Args3 = set_namespace(OP, Args2), - %% TODO: proper calculation of etag - Etag = [$", couch_uuids:new(), $"], Options = [{user_ctx, Req#httpd.user_ctx}], - {ok, Resp} = couch_httpd:etag_maybe(Req, fun() -> - Max = chttpd:chunked_response_buffer_size(), - VAcc0 = #vacc{db=Db, req=Req, threshold=Max, etag=Etag}, - fabric:all_docs(Db, Options, fun couch_mrview_http:view_cb/2, VAcc0, Args3) - end), - case is_record(Resp, vacc) of - true -> {ok, Resp#vacc.resp}; - _ -> {ok, Resp} - end. + Max = chttpd:chunked_response_buffer_size(), + VAcc = #vacc{db=Db, req=Req, threshold=Max}, + fabric:all_docs(Db, Options, fun couch_mrview_http:view_cb/2, VAcc, Args3). db_doc_req(#httpd{method='DELETE'}=Req, Db, DocId) -> % check for the existence of the doc to handle the 404 case.
