nlight-jdev / jcouchdb

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

org.jcouchdb.db.Database.compact throw DataAccessException, should use POST instead of GET #35

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Execute org.jcouchdb.db.Database.compact() method.
2. the API will throw DataAccessException because CouchDB will return this 
{"error":"method_not_allowed","reason":"Only POST allowed"}

What is the expected output? What do you see instead?
According the CouchDB wiki: http://wiki.apache.org/couchdb/Compaction, the 
compact method should be called via POST instead of GET. I have modified 
the source code to use post method with empty data, then everything works 
fine so far. I have attached the modified source for your reference. 

What version of the product are you using? On what operating system?
I am using CouchDB 0.10.0 on Linux (ubuntu 9.10) and running jcouchdb-
0.10.0-3

Please provide any additional information below.

Original issue reported on code.google.com by roger.c...@gmail.com on 29 Jan 2010 at 3:34

Attachments:

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r243.

Original comment by ff...@gmx.de on 14 Feb 2010 at 4:13