Return-Path: Delivered-To: apmail-incubator-couchdb-dev-archive@locus.apache.org Received: (qmail 17719 invoked from network); 26 May 2008 09:29:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 May 2008 09:29:24 -0000 Received: (qmail 29625 invoked by uid 500); 26 May 2008 09:29:25 -0000 Delivered-To: apmail-incubator-couchdb-dev-archive@incubator.apache.org Received: (qmail 29595 invoked by uid 500); 26 May 2008 09:29:25 -0000 Mailing-List: contact couchdb-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-dev@incubator.apache.org Delivered-To: mailing list couchdb-dev@incubator.apache.org Received: (qmail 29584 invoked by uid 99); 26 May 2008 09:29:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 May 2008 02:29:25 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [83.97.50.139] (HELO jan.prima.de) (83.97.50.139) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 May 2008 09:28:37 +0000 Received: from [10.0.2.3] (e179129042.adsl.alicedsl.de [::ffff:85.179.129.42]) (AUTH: LOGIN jan, SSL: TLSv1/SSLv3,128bits,AES128-SHA) by jan.prima.de with esmtp; Mon, 26 May 2008 09:28:50 +0000 Message-Id: <0391B637-B8F0-44C3-9883-623BB691995E@apache.org> From: Jan Lehnardt To: couchdb-dev@incubator.apache.org In-Reply-To: <20080526092048.E274723889F1@eris.apache.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: svn commit: r660139 - /incubator/couchdb/trunk/src/couchdb/couch_httpd.erl Date: Mon, 26 May 2008 11:28:48 +0200 References: <20080526092048.E274723889F1@eris.apache.org> X-Mailer: Apple Mail (2.919.2) X-Virus-Checked: Checked by ClamAV on apache.org 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}) -> > > >