vmx / couchdb

Mirror of Apache CouchDB
81 stars 4 forks source link

Wrong content-type when querying with count=true #7

Closed berb closed 14 years ago

berb commented 14 years ago

When querying with the count parameter set to true, the response entity will only be a number. However, this is no valid JSON. So it should either return a minimal JSON struct like {"count":123} or the content-type in the header should be set to text/plain.

vmx commented 14 years ago

CouchDB always returns JSON, I'll change it it {"count":123}.

vmx commented 14 years ago

http://github.com/vmx/couchdb/commit/b11b01315d0e5bbef534dafe0187db3f6871c70b fixes it. Thanks Benjamin.