On Thu, Jan 27, 2011 at 1: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
>

This bit of code will be going away in a version or two. You'll want
to look at the http proxy for handling arbitrary requests now (which
will be in 1.1.0)

Reply via email to