I think you want to write a new handler under the
[httpd_global_handlers] as you noted before. That will allow calls to
/_whatever to call your code. You can use the many existing handlers
as examples to guide you, and folks on #couchdb will be happy to help
out if you have further questions (and replies here too, of course).

B.

On Thu, Jan 27, 2011 at 6:02 PM, Chris Stockton
<[email protected]> wrote:
> I looked through the code, and noticed:
>
> A bit of code from [1]:
>
>        handle_external_req(#httpd{
> 29                              path_parts=[_DbName, _External, UrlName | 
> _Path]
> 30                          }=HttpReq, Db) ->
> 31          process_external_req(HttpReq, Db, UrlName);
> 32      handle_external_req(#httpd{path_parts=[_, _]}=Req, _Db) ->
> 33          send_error(Req, 404, <<"external_server_error">>, <<"No server
> name specified.">>);
> 34      handle_external_req(Req, _) ->
> 35          send_error(Req, 404, <<"external_server_error">>, <<"Broken
> assumption">>).
>
> From what I have seen of erlang, this means if no DBName exists, then
> it will not work. Maybe we could add a optional path without a dbname
> so people could make global external handlers or would more code be
> required?
>
> [1] 
> http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd_external.erl?view=markup
>

Reply via email to