diff options
author | John Christopher Anderson <jchris@apache.org> | 2009-01-29 22:15:48 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2009-01-29 22:15:48 +0000 |
commit | ace6dfe0107010b57c5da0596f69cfd10fc84a38 (patch) | |
tree | bbcaedf64e20a580214f1b1f74cd40473073279c /src/couchdb/couch_httpd_db.erl | |
parent | 7cbee5abae38fca0c612e22bb1079641c96cd348 (diff) |
Replacement of inets with ibrowse. Fixes COUCHDB-179 and enhances replication.
Thanks Jason Davies and Adam Kocoloski for the fix, Maximillian Dornseif for reporting.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@739047 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_httpd_db.erl')
-rw-r--r-- | src/couchdb/couch_httpd_db.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl index 73d90fe6..2cb4c403 100644 --- a/src/couchdb/couch_httpd_db.erl +++ b/src/couchdb/couch_httpd_db.erl @@ -261,7 +261,8 @@ db_req(#httpd{method='GET',mochi_req=MochiReq, path_parts=[DbName,<<"_design/",_ PathFront = "/" ++ couch_httpd:quote(binary_to_list(DbName)) ++ "/", RawSplit = regexp:split(MochiReq:get(raw_path),"_design%2F"), {ok, [PathFront|PathTail]} = RawSplit, - RedirectTo = PathFront ++ "_design/" ++ mochiweb_util:join(PathTail, "%2F"), + RedirectTo = couch_httpd:absolute_uri(Req, PathFront ++ "_design/" ++ + mochiweb_util:join(PathTail, "%2F")), couch_httpd:send_response(Req, 301, [{"Location", RedirectTo}], <<>>); db_req(#httpd{path_parts=[_DbName,<<"_design">>,Name]}=Req, Db) -> |