diff options
author | Jan Lehnardt <jan@apache.org> | 2009-08-04 17:25:17 +0000 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2009-08-04 17:25:17 +0000 |
commit | 251e9ad70c6851023f6765fa5b5a6fdcc8456b2a (patch) | |
tree | 3b7190565098706c3e9bae3a30faeab84d3d4c19 /src/couchdb/couch_httpd_db.erl | |
parent | 538cfb0940efaab2729724519b68bee8bdbcfad4 (diff) |
encode slashes in db names in Location response header after database creation, move couch_rep:url_encode/1 to couch_util:url_encode/1, closes COUCHDB-411
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@800883 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_httpd_db.erl')
-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 63ae5563..119182af 100644 --- a/src/couchdb/couch_httpd_db.erl +++ b/src/couchdb/couch_httpd_db.erl @@ -237,7 +237,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), - DocUrl = absolute_uri(Req, "/" ++ DbName), + DocUrl = absolute_uri(Req, "/" ++ couch_util:url_encode(DbName)), send_json(Req, 201, [{"Location", DocUrl}], {[{ok, true}]}); Error -> throw(Error) |