diff options
author | Adam Kocoloski <adam@cloudant.com> | 2010-07-29 20:33:26 -0400 |
---|---|---|
committer | Adam Kocoloski <adam@cloudant.com> | 2010-08-12 11:21:01 -0400 |
commit | c232a16f5938fbd0ff1f37d9933d3f6eb7a98066 (patch) | |
tree | 1ec377473982e7a7fd5b08c9e8849b226f3534d3 /src | |
parent | b4ba7a67ff78eb84c85c6f8e67fa6022745b3e54 (diff) |
enable _search handler. Didn't add [external] block to config
Diffstat (limited to 'src')
-rw-r--r-- | src/chttpd.erl | 3 | ||||
-rw-r--r-- | src/chttpd_external.erl | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/chttpd.erl b/src/chttpd.erl index e6e9866b..0c4d2d70 100644 --- a/src/chttpd.erl +++ b/src/chttpd.erl @@ -218,7 +218,8 @@ db_url_handlers() -> {<<"_compact">>, fun chttpd_db:handle_compact_req/2}, {<<"_design">>, fun chttpd_db:handle_design_req/2}, {<<"_temp_view">>, fun chttpd_db:handle_temp_view_req/2}, - {<<"_changes">>, fun chttpd_db:handle_changes_req/2} + {<<"_changes">>, fun chttpd_db:handle_changes_req/2}, + {<<"_search">>, fun chttpd_external:handle_search_req/2} ]. design_url_handlers() -> diff --git a/src/chttpd_external.erl b/src/chttpd_external.erl index 3aff3291..ffde0ee7 100644 --- a/src/chttpd_external.erl +++ b/src/chttpd_external.erl @@ -15,11 +15,15 @@ -export([handle_external_req/2, handle_external_req/3]). -export([send_external_response/2, json_req_obj/2, json_req_obj/3]). -export([default_or_content_type/2, parse_external_response/1]). +-export([handle_search_req/2]). -import(chttpd,[send_error/4]). -include_lib("couch/include/couch_db.hrl"). +handle_search_req(Req, Db) -> + process_external_req(Req, Db, <<"search">>). + % handle_external_req/2 % for the old type of config usage: % _external = {chttpd_external, handle_external_req} |