summaryrefslogtreecommitdiff
path: root/src/couchdb
diff options
context:
space:
mode:
authorPaul Joseph Davis <davisp@apache.org>2009-04-18 17:12:38 +0000
committerPaul Joseph Davis <davisp@apache.org>2009-04-18 17:12:38 +0000
commit1df7a4e6a659550cde173381a0e0f9d770417d59 (patch)
tree9b6965ef1f69aea7d897efe10851b7bbdc6ac277 /src/couchdb
parent6adbab8f3fadda652844c8db7ca30d382ad0fa5a (diff)
Fixes COUCHDB-310
Change the hardcoded "/_utils/" redirect to append a '/' to the current path. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@766358 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb')
-rw-r--r--src/couchdb/couch_httpd_misc_handlers.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/couchdb/couch_httpd_misc_handlers.erl b/src/couchdb/couch_httpd_misc_handlers.erl
index 46fed095..fa42e9c3 100644
--- a/src/couchdb/couch_httpd_misc_handlers.erl
+++ b/src/couchdb/couch_httpd_misc_handlers.erl
@@ -50,7 +50,8 @@ handle_utils_dir_req(#httpd{method='GET'}=Req, DocumentRoot) ->
couch_httpd:serve_file(Req, RelativePath, DocumentRoot);
{_ActionKey, "", _RelativePath} ->
% GET /_utils
- couch_httpd:send_redirect(Req, "/_utils/")
+ RedirectPath = couch_httpd:path(Req) ++ "/",
+ couch_httpd:send_redirect(Req, RedirectPath)
end;
handle_utils_dir_req(Req, _) ->
send_method_not_allowed(Req, "GET,HEAD").