couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cml...@apache.org
Subject svn commit: r663055 - in /incubator/couchdb/trunk: THANKS src/couchdb/couch_httpd.erl
Date Wed, 04 Jun 2008 10:41:46 GMT
Author: cmlenz
Date: Wed Jun  4 03:41:46 2008
New Revision: 663055

URL: http://svn.apache.org/viewvc?rev=663055&view=rev
Log:
Enable the use of an unencoded slash in the URL of design documents. Closes COUCHDB-49. Thanks
to Paul Davis for the patch.

Modified:
    incubator/couchdb/trunk/THANKS
    incubator/couchdb/trunk/src/couchdb/couch_httpd.erl

Modified: incubator/couchdb/trunk/THANKS
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/THANKS?rev=663055&r1=663054&r2=663055&view=diff
==============================================================================
--- incubator/couchdb/trunk/THANKS (original)
+++ incubator/couchdb/trunk/THANKS Wed Jun  4 03:41:46 2008
@@ -9,6 +9,7 @@
  * Chris Anderson <jchris@grabb.it>
  * William Beh <willbeh@gmail.com>
  * Benoit Chesneau <bchesneau@gmail.com>
+ * Paul Joseph Davis <paul.joseph.davis@gmail.com>
  * Till Klampaeckel <till@klampaeckel.de>
  * Roger Leigh <rleigh@debian.org>
  * Jim Lindley <web@jimlindley.com>

Modified: incubator/couchdb/trunk/src/couchdb/couch_httpd.erl
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/src/couchdb/couch_httpd.erl?rev=663055&r1=663054&r2=663055&view=diff
==============================================================================
--- incubator/couchdb/trunk/src/couchdb/couch_httpd.erl (original)
+++ incubator/couchdb/trunk/src/couchdb/couch_httpd.erl Wed Jun  4 03:41:46 2008
@@ -432,6 +432,12 @@
 
 % Document request handlers
 
+handle_db_request(Req, Method, {DbName, Db, ["_design", DesignName]}) ->
+    % Special case to enable using an unencoded in the URL of design docs, as
+    % slashes in document IDs must otherwise be URL encoded
+    DocId = mochiweb_util:join(["_design", DesignName], "/"),
+    handle_db_request(Req, Method, {DbName, Db, [DocId]});
+
 handle_db_request(Req, Method, {DbName, Db, [DocId]}) ->
     UnquotedDocId = mochiweb_util:unquote(DocId),
     handle_doc_request(Req, Method, DbName, Db, UnquotedDocId);



Mime
View raw message