You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2021/05/31 20:09:24 UTC
[couchdb] 01/01: Delete unused chttpd_show:apply_etag/2 function
This is an automated email from the ASF dual-hosted git repository.
jaydoane pushed a commit to branch unused-function-apply_etag
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit ef8538caf00b4baeb1b3a127348263b16b7a7cc1
Author: Jay Doane <ja...@apache.org>
AuthorDate: Mon May 31 12:58:25 2021 -0700
Delete unused chttpd_show:apply_etag/2 function
This code is generating an unused function compilation warning.
---
src/chttpd/src/chttpd_show.erl | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/src/chttpd/src/chttpd_show.erl b/src/chttpd/src/chttpd_show.erl
index 9fda7ff..fb71247 100644
--- a/src/chttpd/src/chttpd_show.erl
+++ b/src/chttpd/src/chttpd_show.erl
@@ -100,18 +100,6 @@ json_apply_field({Key, NewValue}, [], Acc) ->
% end of list, add ours
{[{Key, NewValue}|Acc]}.
-apply_etag(JsonResp, undefined) ->
- JsonResp;
-apply_etag({ExternalResponse}, CurrentEtag) ->
- % Here we embark on the delicate task of replacing or creating the
- % headers on the JsonResponse object. We need to control the Etag and
- % Vary headers. If the external function controls the Etag, we'd have to
- % run it to check for a match, which sort of defeats the purpose.
- apply_headers(ExternalResponse, [
- {<<"ETag">>, CurrentEtag},
- {<<"Vary">>, <<"Accept">>}
- ]).
-
apply_headers(JsonResp, []) ->
JsonResp;
apply_headers(JsonResp, NewHeaders) ->