summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2009-10-18 02:10:04 +0000
committerJan Lehnardt <jan@apache.org>2009-10-18 02:10:04 +0000
commit430b75f7572d3033fe61e341d0ee5ff1167831e2 (patch)
treefd4622a4da1f240ad97153b18f844f1490a79fb7 /src
parent75364fead46acbb370efaf5c84ffdc31529d7c31 (diff)
log external reqests like any other requests
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@826345 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/couchdb/couch_httpd.erl2
-rw-r--r--src/couchdb/couch_httpd_external.erl3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl
index 70b31d16..b28486fa 100644
--- a/src/couchdb/couch_httpd.erl
+++ b/src/couchdb/couch_httpd.erl
@@ -19,7 +19,7 @@
-export([verify_is_server_admin/1,unquote/1,quote/1,recv/2,recv_chunked/4,error_info/1]).
-export([parse_form/1,json_body/1,json_body_obj/1,body/1,doc_etag/1, make_etag/1, etag_respond/3]).
-export([primary_header_value/2,partition/1,serve_file/3, server_header/0]).
--export([start_chunked_response/3,send_chunk/2]).
+-export([start_chunked_response/3,send_chunk/2,log_request/2]).
-export([start_response_length/4, send/2]).
-export([start_json_response/2, start_json_response/3, end_json_response/1]).
-export([send_response/4,send_method_not_allowed/2,send_error/4, send_redirect/2,send_chunked_error/2]).
diff --git a/src/couchdb/couch_httpd_external.erl b/src/couchdb/couch_httpd_external.erl
index bae7a410..0a26bcf7 100644
--- a/src/couchdb/couch_httpd_external.erl
+++ b/src/couchdb/couch_httpd_external.erl
@@ -94,13 +94,14 @@ to_json_terms([{Key, Value} | Rest], Acc) ->
to_json_terms(Rest, [{list_to_binary(Key), list_to_binary(Value)} | Acc]).
-send_external_response(#httpd{mochi_req=MochiReq}, Response) ->
+send_external_response(#httpd{mochi_req=MochiReq}=Req, Response) ->
#extern_resp_args{
code = Code,
data = Data,
ctype = CType,
headers = Headers
} = parse_external_response(Response),
+ couch_httpd:log_request(Req, Code),
Resp = MochiReq:respond({Code,
default_or_content_type(CType, Headers ++ couch_httpd:server_header()), Data}),
{ok, Resp}.