summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--THANKS1
-rw-r--r--src/couchdb/couch_httpd.erl6
2 files changed, 7 insertions, 0 deletions
diff --git a/THANKS b/THANKS
index e05741f0..f5270508 100644
--- a/THANKS
+++ b/THANKS
@@ -9,6 +9,7 @@ changes. A list of these people is included below.
* 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>
diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl
index 27bc385c..d22ea2b1 100644
--- a/src/couchdb/couch_httpd.erl
+++ b/src/couchdb/couch_httpd.erl
@@ -432,6 +432,12 @@ handle_db_request(_Req, _Method, {_DbName, _Db, ["_temp_view"]}) ->
% 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);