Repository: couchdb-chttpd Updated Branches: refs/heads/master 9ddbd0404 -> 6697f3f2d
Unify headers to be a list to avoid crashing CORS Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/6697f3f2 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/6697f3f2 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/6697f3f2 Branch: refs/heads/master Commit: 6697f3f2d0d26670bfbe87ba0bd342a34daf0a49 Parents: 9ddbd04 Author: ILYA Khlopotov <iil...@ca.ibm.com> Authored: Thu Jul 16 13:54:38 2015 -0700 Committer: Russell Branca <chewbra...@apache.org> Committed: Thu Jul 16 14:30:29 2015 -0700 ---------------------------------------------------------------------- src/chttpd_db.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/6697f3f2/src/chttpd_db.erl ---------------------------------------------------------------------- diff --git a/src/chttpd_db.erl b/src/chttpd_db.erl index 7f63023..c54340c 100644 --- a/src/chttpd_db.erl +++ b/src/chttpd_db.erl @@ -789,7 +789,7 @@ send_doc_efficiently(Req, #doc{atts=Atts}=Doc, Headers, Options) -> [attachments, follows, att_encoding_info | Options])), {ContentType, Len} = couch_doc:len_doc_to_multi_part_stream( Boundary,JsonBytes, Atts, true), - CType = {<<"Content-Type">>, ContentType}, + CType = {"Content-Type", ContentType}, {ok, Resp} = start_response_length(Req, 200, [CType|Headers], Len), couch_doc:doc_to_multi_part_stream(Boundary,JsonBytes,Atts, fun(Data) -> couch_httpd:send(Resp, Data) end, true) @@ -1077,7 +1077,7 @@ db_attachment_req(#httpd{method='GET',mochi_req=MochiReq}=Req, Db, DocId, FileNa Ranges = parse_ranges(MochiReq:get(range), Len), case {Enc, Ranges} of {identity, [{From, To}]} -> - Headers1 = [{<<"Content-Range">>, make_content_range(From, To, Len)}] + Headers1 = [{"Content-Range", make_content_range(From, To, Len)}] ++ Headers, {ok, Resp} = start_response_length(Req, 206, Headers1, To - From + 1), couch_att:range_foldl(Att, From, To + 1,