You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2019/10/28 13:13:10 UTC
[couchdb] 05/07: add handle_request/1
This is an automated email from the ASF dual-hosted git repository.
rnewson pushed a commit to branch 1523-bye-bye-5986-rnewson
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 5262f84f9e49774201394925f42d54c0964e7f4e
Author: Joan Touzet <jo...@atypical.net>
AuthorDate: Mon Oct 14 16:44:54 2019 +0100
add handle_request/1
---
src/couch/src/couch_httpd.erl | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/couch/src/couch_httpd.erl b/src/couch/src/couch_httpd.erl
index 1085a5b..f71ff8d 100644
--- a/src/couch/src/couch_httpd.erl
+++ b/src/couch/src/couch_httpd.erl
@@ -37,6 +37,7 @@
-export([validate_host/1]).
-export([validate_bind_address/1]).
-export([check_max_request_length/1]).
+-export([handle_request/1]).
-define(HANDLER_NAME_IN_MODULE_POS, 6).
@@ -219,6 +220,11 @@ make_arity_3_fun(SpecStr) ->
make_fun_spec_strs(SpecStr) ->
re:split(SpecStr, "(?<=})\\s*,\\s*(?={)", [{return, list}]).
+handle_request(MochiReq) ->
+ DefaultFun = make_arity_1_fun("{couch_httpd_db, handle_request}"),
+ EmptyDict = dict:new(),
+ handle_request(MochiReq, DefaultFun, EmptyDict, EmptyDict, EmptyDict).
+
handle_request(MochiReq, DefaultFun, UrlHandlers, DbUrlHandlers,
DesignUrlHandlers) ->
%% reset rewrite count for new request