couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject couch commit: updated refs/heads/fix-rewrites-js to c1c7f50
Date Mon, 18 Apr 2016 09:48:58 GMT
Repository: couchdb-couch
Updated Branches:
  refs/heads/fix-rewrites-js [created] c1c7f5060


headers specified in a JS rewrite can come back as binaries.

fixes rewrites_js JS test.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/c1c7f506
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/c1c7f506
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/c1c7f506

Branch: refs/heads/fix-rewrites-js
Commit: c1c7f50603694faa529ab69c43f3327bd5bcfcef
Parents: bf9cd2b
Author: Jan Lehnardt <jan@apache.org>
Authored: Mon Apr 18 11:48:22 2016 +0200
Committer: Jan Lehnardt <jan@apache.org>
Committed: Mon Apr 18 11:48:22 2016 +0200

----------------------------------------------------------------------
 src/couch_httpd.erl | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/c1c7f506/src/couch_httpd.erl
----------------------------------------------------------------------
diff --git a/src/couch_httpd.erl b/src/couch_httpd.erl
index c4f5a9c..de65177 100644
--- a/src/couch_httpd.erl
+++ b/src/couch_httpd.erl
@@ -695,7 +695,10 @@ send(Resp, Data) ->
 
 no_resp_conn_header([]) ->
     true;
-no_resp_conn_header([{Hdr, _}|Rest]) ->
+no_resp_conn_header([{Hdr, V}|Rest]) when is_binary(Hdr)->
+    no_resp_conn_header([{?b2l(Hdr), V}|Rest]);
+no_resp_conn_header([{Hdr, _}|Rest]) when is_list(Hdr)->
+    io:format("~n~nHdr: ~p~n~n", [Hdr]),
     case string:to_lower(Hdr) of
         "connection" -> false;
         _ -> no_resp_conn_header(Rest)


Mime
View raw message