couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r826345 - in /couchdb/trunk/src/couchdb: couch_httpd.erl couch_httpd_external.erl
Date Sun, 18 Oct 2009 02:10:04 GMT
Author: jan
Date: Sun Oct 18 02:10:04 2009
New Revision: 826345

URL: http://svn.apache.org/viewvc?rev=826345&view=rev
Log:
log external reqests like any other requests

Modified:
    couchdb/trunk/src/couchdb/couch_httpd.erl
    couchdb/trunk/src/couchdb/couch_httpd_external.erl

Modified: couchdb/trunk/src/couchdb/couch_httpd.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd.erl?rev=826345&r1=826344&r2=826345&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_httpd.erl (original)
+++ couchdb/trunk/src/couchdb/couch_httpd.erl Sun Oct 18 02:10:04 2009
@@ -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]).

Modified: couchdb/trunk/src/couchdb/couch_httpd_external.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd_external.erl?rev=826345&r1=826344&r2=826345&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_httpd_external.erl (original)
+++ couchdb/trunk/src/couchdb/couch_httpd_external.erl Sun Oct 18 02:10:04 2009
@@ -94,13 +94,14 @@
     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}.



Mime
View raw message