nlight-jdev / jcouchdb

Automatically exported from code.google.com/p/jcouchdb
Other
0 stars 0 forks source link

Deleting database with slash produces 404 #50

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Preparation:
Run all CouchDB 1.0 tests or create database with slash, e.g. 
'test_suite_db/with_slashes'

What steps will reproduce the problem?
List<String> databases = server.listDatabases();
for (String database : databases)
if (...)
server.deleteDatabase(database);
// 404

---
Another test:
Database d = new Database(server, "test_suite_db/with_slashes");
d.getStatus();
// 404

---
This can be fixed using URLEncoder.encode when creating the URL from database 
name.

Original issue reported on code.google.com by guglj...@zoznam.sk on 1 Aug 2010 at 8:33