diff options
author | Jan Lehnardt <jan@apache.org> | 2009-03-26 16:28:21 +0000 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2009-03-26 16:28:21 +0000 |
commit | 39a927058a066e7c7c31cb4388371f2c8b639e4b (patch) | |
tree | 2a99fce4dc8942b4750c0aa4f94feecf641b0db9 /src | |
parent | a52f54c34d24ba82bbbab05e4582a977eb0c773f (diff) |
return Location header for newly create databases
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@758723 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/couchdb/couch_httpd_db.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl index 2bfc2940..92ad98c8 100644 --- a/src/couchdb/couch_httpd_db.erl +++ b/src/couchdb/couch_httpd_db.erl @@ -56,7 +56,7 @@ create_db_req(#httpd{user_ctx=UserCtx}=Req, DbName) -> case couch_server:create(DbName, [{user_ctx, UserCtx}]) of {ok, Db} -> couch_db:close(Db), - send_json(Req, 201, {[{ok, true}]}); + send_json(Req, 201, [{"Location", "/" ++ DbName}], {[{ok, true}]}); Error -> throw(Error) end. |