From c232a16f5938fbd0ff1f37d9933d3f6eb7a98066 Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Thu, 29 Jul 2010 20:33:26 -0400 Subject: enable _search handler. Didn't add [external] block to config --- src/chttpd.erl | 3 ++- src/chttpd_external.erl | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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} -- cgit v1.2.3