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/06/01 04:14:01 UTC

[couchdb] branch main updated: 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 main
in repository https://gitbox.apache.org/repos/asf/couchdb.git


The following commit(s) were added to refs/heads/main by this push:
     new 90b230e  Delete unused chttpd_show:apply_etag/2 function
90b230e is described below

commit 90b230e7f47a3368452daa4f51bd8858c9ccdd00
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) ->