Repository: couchdb-chttpd
Updated Branches:
  refs/heads/master 050cbc6ad -> 5640f8501


_log is removed as we delegate to lager


Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/5640f850
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/5640f850
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/5640f850

Branch: refs/heads/master
Commit: 5640f8501a04267400e851d49b21dbc08784b078
Parents: 050cbc6
Author: Robert Newson <[email protected]>
Authored: Fri Jun 27 10:21:34 2014 +0100
Committer: Robert Newson <[email protected]>
Committed: Fri Jun 27 10:21:34 2014 +0100

----------------------------------------------------------------------
 src/chttpd.erl      |  1 -
 src/chttpd_misc.erl | 18 +-----------------
 2 files changed, 1 insertion(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/5640f850/src/chttpd.erl
----------------------------------------------------------------------
diff --git a/src/chttpd.erl b/src/chttpd.erl
index d753ca2..c9247c9 100644
--- a/src/chttpd.erl
+++ b/src/chttpd.erl
@@ -355,7 +355,6 @@ url_handler("_active_tasks") -> fun 
chttpd_misc:handle_task_status_req/1;
 url_handler("_config") ->       fun chttpd_misc:handle_config_req/1;
 url_handler("_replicate") ->    fun chttpd_misc:handle_replicate_req/1;
 url_handler("_uuids") ->        fun chttpd_misc:handle_uuids_req/1;
-url_handler("_log") ->          fun chttpd_misc:handle_log_req/1;
 url_handler("_sleep") ->        fun chttpd_misc:handle_sleep_req/1;
 url_handler("_session") ->      fun chttpd_auth:handle_session_req/1;
 url_handler("_oauth") ->        fun couch_httpd_oauth:handle_oauth_req/1;

http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/5640f850/src/chttpd_misc.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_misc.erl b/src/chttpd_misc.erl
index 9a1189f..600b6a4 100644
--- a/src/chttpd_misc.erl
+++ b/src/chttpd_misc.erl
@@ -14,7 +14,7 @@
 
 -export([handle_welcome_req/2,handle_favicon_req/2,handle_utils_dir_req/2,
     handle_all_dbs_req/1,handle_replicate_req/1,handle_restart_req/1,
-    handle_uuids_req/1,handle_config_req/1,handle_log_req/1,
+    handle_uuids_req/1,handle_config_req/1,
     handle_task_status_req/1,handle_sleep_req/1,handle_welcome_req/1,
     handle_utils_dir_req/1, handle_favicon_req/1, handle_system_req/1,
     handle_up_req/1]).
@@ -251,22 +251,6 @@ 
handle_config_req(#httpd{method='DELETE',path_parts=[_,Section,Key]}=Req) ->
 handle_config_req(Req) ->
     send_method_not_allowed(Req, "GET,PUT,DELETE").
 
-% httpd log handlers
-
-handle_log_req(#httpd{method='GET'}=Req) ->
-    Bytes = list_to_integer(chttpd:qs_value(Req, "bytes", "1000")),
-    Offset = list_to_integer(chttpd:qs_value(Req, "offset", "0")),
-    Chunk = couch_log:read(Bytes, Offset),
-    {ok, Resp} = start_chunked_response(Req, 200, [
-        % send a plaintext response
-        {"Content-Type", "text/plain; charset=utf-8"},
-        {"Content-Length", integer_to_list(length(Chunk))}
-    ]),
-    send_chunk(Resp, Chunk),
-    send_chunk(Resp, "");
-handle_log_req(Req) ->
-    send_method_not_allowed(Req, "GET").
-
 % Note: this resource is exposed on the backdoor interface, but it's in chttpd
 % because it's not couch trunk
 handle_system_req(Req) ->

Reply via email to