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 5f1aa39 [Forced Update!]
Date Mon, 18 Apr 2016 09:49:53 GMT
Repository: couchdb-couch
Updated Branches:
  refs/heads/fix-rewrites-js c1c7f5060 -> 5f1aa392e (forced update)


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/5f1aa392
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/5f1aa392
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/5f1aa392

Branch: refs/heads/fix-rewrites-js
Commit: 5f1aa392e69a78398e2ec86d67d9069e6fe805ab
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:49:45 2016 +0200

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


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/5f1aa392/src/couch_httpd.erl
----------------------------------------------------------------------
diff --git a/src/couch_httpd.erl b/src/couch_httpd.erl
index c4f5a9c..2dd6ed2 100644
--- a/src/couch_httpd.erl
+++ b/src/couch_httpd.erl
@@ -695,7 +695,9 @@ 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)->
     case string:to_lower(Hdr) of
         "connection" -> false;
         _ -> no_resp_conn_header(Rest)


Mime
View raw message