When attachments were returned (?attachments=true) while CORS was enabled and used, an error occured. The reason for this error were headers that were encoded as binaries instead of lists. String operations on binaries throw errors. This commit fixes COUCHDB-1689.
We were spuriously throwing rewrite limit exceeded for non-looping rewrites. This patch resets the count to zero at the start of a new request and adds a test. COUCHDB-1651
Closes COUCHDB-431 Patch by: - Dale Harvey - Benoit Chesneau - Jan Lehnardt - Robert Newson See `etc/couchdb/default.ini.tpl.in` for configuration examples.