summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_httpd_external.erl
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2009-01-23 00:53:05 +0000
committerJohn Christopher Anderson <jchris@apache.org>2009-01-23 00:53:05 +0000
commit0a46c330072a3811d98a5c989d4c6486cff83df2 (patch)
treec3eaab8bc703fd0b4c375d70efb1eea42d68a1ed /src/couchdb/couch_httpd_external.erl
parent3e12deff5c0f87eefcd3de8dbf93a9724e98258e (diff)
View list functions can stream views in any format. See list_views test for details.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@736876 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_httpd_external.erl')
-rw-r--r--src/couchdb/couch_httpd_external.erl13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/couchdb/couch_httpd_external.erl b/src/couchdb/couch_httpd_external.erl
index 7a682ddd..692044ba 100644
--- a/src/couchdb/couch_httpd_external.erl
+++ b/src/couchdb/couch_httpd_external.erl
@@ -14,18 +14,12 @@
-export([handle_external_req/2, handle_external_req/3]).
-export([send_external_response/2, json_req_obj/2]).
+-export([default_or_content_type/2, parse_external_response/1]).
-import(couch_httpd,[send_error/4]).
-include("couch_db.hrl").
--record(extern_resp_args, {
- code = 200,
- data = <<>>,
- ctype = "application/json",
- headers = []
-}).
-
% handle_external_req/2
% for the old type of config usage:
% _external = {couch_httpd_external, handle_external_req}
@@ -121,7 +115,10 @@ parse_external_response({Response}) ->
{<<"body">>, Value} ->
Args#extern_resp_args{data=Value, ctype="text/html"};
{<<"base64">>, Value} ->
- Args#extern_resp_args{data=couch_util:decodeBase64(Value), ctype="application/binary"};
+ Args#extern_resp_args{
+ data=couch_util:decodeBase64(Value),
+ ctype="application/binary"
+ };
{<<"headers">>, {Headers}} ->
NewHeaders = lists:map(fun({Header, HVal}) ->
{binary_to_list(Header), binary_to_list(HVal)}