On May 26, 2008, at 11:20, cmlenz@apache.org wrote: > Author: cmlenz > Date: Mon May 26 02:20:47 2008 > New Revision: 660139 > > URL: http://svn.apache.org/viewvc?rev=660139&view=rev > Log: > Change error handling on unknown private paths to be more consistent > with how other errors are handled. This was a deliberate derivation from the error handling to be more user-friendly. That is, directly show the user that they meant "/_utils" when they tried "/_util". with the advent of customizable private paths, I though this a valuable addition. > > > Modified: > incubator/couchdb/trunk/src/couchdb/couch_httpd.erl > > Modified: incubator/couchdb/trunk/src/couchdb/couch_httpd.erl > URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/src/couchdb/couch_httpd.erl?rev=660139&r1=660138&r2=660139&view=diff > = > = > = > = > = > = > = > = > ====================================================================== > --- incubator/couchdb/trunk/src/couchdb/couch_httpd.erl (original) > +++ incubator/couchdb/trunk/src/couchdb/couch_httpd.erl Mon May 26 > 02:20:47 2008 > @@ -99,8 +99,8 @@ > {ok, Req:respond({301, [{"Location", "/_utils/"}], > <<>>})}; > "/_utils/" ++ PathInfo -> > {ok, Req:serve_file(PathInfo, DocumentRoot)}; > - "/_" ++ UnknownPrivatePath -> > - handle_unkown_private_uri_request(Req, Method, > UnknownPrivatePath); > + "/_" ++ _Path -> > + throw({not_found, unknown_private_path}); > _Else -> > handle_db_request(Req, Method, {Path}) > end. > @@ -134,18 +134,6 @@ > handle_replicate_request(_Req, _Method) -> > throw({method_not_allowed, "POST"}). > > -handle_unkown_private_uri_request(Req, _Method, UnknownPrivatePath) > -> > - KnownPrivatePaths = ["_utils"], > - Msg = {obj, > - [ > - {error, "Could not find the private path '_" ++ > - mochiweb_util:unquote(UnknownPrivatePath) ++ > - "'. Known private path(s): '" ++ > - lists:flatten(KnownPrivatePaths) ++ "'"} > - ] > - }, > - send_error(Req, 404, Msg). > - > % Database request handlers > > handle_db_request(Req, Method, {Path}) -> > > >